Part Number Hot Search : 
P4KE220 SS14MBP2 1N4586GP VISHAY AD1958 GC10DLH 2A103K ST62T60B
Product Description
Full Text Search
 

To Download MC1101A-P Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  advanced brushless motor control chipset mc1231a mc1131a supports 3-phase as well as 2-phase brushless motors performs trajectory generation, servo loop closure, and commutation ultra-smooth sinusoidal commutation open or closed loop operation software and feature-compatible with other 1st generation pmd chipsets available in 1 or 2 axis configurations 32-bit position, velocity, acceleration and j erk trajectory profile registers choice of s-curve, trapezoidal, or contoured velocity profile modes electronic gearing two travel-limit switches per axis choice of pwm or dac motor output signals easy-to-use packet-oriented command protocol features general description the mc1231a is a dedicated motion processor which functions as a complete chip-based motor controller. packaged in a 2-ic chipset, this device performs trajectory generation, servo loop closure, and sinusoidal commutation. the chipset inputs incremental encoder signals and outputs pwm or dac-compatible motor command signals. the mc1231a is available in a one, or a two-axis configuration. the mc1231a is functionally similar to other members of pmd's 1st generation chipset family however it adds the ability to perform sinusoidal commutation of brushless motors. all of these devices provide sophisticated motion control capabilities allowing the creation of complex profile sequences with very low tracking errors. both two and three-phase brushless motors are supported by the mc1231a. when used with two-phase brushless motors each phase is separated by 90 degrees. when used with 3-phase brushless motors each phase is separated by 120 degress. the commutation angle is continuously calculated using the encoder position. user-programmable commutation parameters allow a very wide range of encoders and motors to be controlled. the chipset is controlled by a host processor which interfaces with the chipset via an 8-bit, bi-directional port. communications to/from the chipset consist of packet-oriented messages. the chipset is packaged in 2 68-pin plcc packages. both chips utilize cmos technology and are powered by 5 volts. doc. rev. 10.05, nov 1997 commutation waveforms phase a phase b phase c phase a phase b 3-phase brushless 2-phase brushless performance motion devices, inc. 12 waltham st. lexington, ma 02421 tel: 781.674.9860 fax: 781.674.9861 www.pmdcorp.com
2 table of contents product family overview....................................... page 3 introduction........................................................... page 3 family summary................................................... page 3 electrical characteristics....................................... page 4 absolute maximum ratings.................................. page 4 operating ratings................................................. page 4 dc electrical characteristics ................................ page 5 ac electrical characteristics ................................ page 5 i/o timing diagrams............................................. page 7 pinouts .................................................................... page 12 mc1231a, mc1131a............................................ page 12 pin descriptions.................................................... page 13 theory of operations ............................................. page 17 operational parameters ....................................... page 18 trajectory profile generation................................ page 18 s-curve point to point....................................... page 19 trapezoidal point to point................................. page 20 velocity contouring........................................... page 20 electronic gear................................................. page 21 trajectory control ................................................. page 21 halting the trajectory ....................................... page 21 motion complete status ................................... page 22 digital servo filtering ........................................... page 22 motor bias ........................................................ page 23 motor limit........................................................ page 23 parameter loading & updating ............................ page 23 manual update ................................................. page 24 breakpoints....................................................... page 24 external breakpoints and homing .................... page 25 disabling automatic profile update .................. page 25 travel limit switches............................................ page 25 motion error detection.......................................... page 26 recovering from a motion error ...................... page 26 servo loop control & timing ............................... page 26 host communications .......................................... page 27 electrical interface ............................................ page 27 packet format .................................................. page 27 packet checksum............................................. page 28 illegal commands............................................. page 28 command errors .............................................. page 28 axis addressing................................................ page 29 axis status............................................................ page 29 status word...................................................... page 29 miscellaneous mode status word.....................page 29 host interrupts.......................................................page 30 encoder position feedback ..................................page 31 encoder filtering...............................................page 31 high speed position capture............................page 31 index pulses and commutation ........................page 31 motor outputs .......................................................page 31 motor output control.........................................page 32 sinusoidal commutation .......................................page 31 commutation waveforms..................................page 33 commutation parameters .................................page 33 index pulse referencing ...................................page 33 commutation error detection............................page 34 phase initialization ............................................page 34 phase initialization programming......................page 35 adjusting the commutation angle....................page 36 encoder pre-scalar...........................................page 37 velocity-based phase advance ........................page 37 phase info status word ....................................page 37 commutation command summary...................page 38 motor output configuration...............................page 38 motor output signal interpretation ....................page 38 dac16 decoding...............................................page 39 pwm decoding .................................................page 39 host commands .....................................................page 40 command summary .............................................page 40 command reference ............................................page 42 axis control.......................................................page 42 profile generation .............................................page 43 digital filter .......................................................page 46 parameter update.............................................page 49 interrupt processing ..........................................page 51 status/mode ......................................................page 52 encoder.............................................................page 53 motor .................................................................page 54 miscellaneous ...................................................page 55 commutation.....................................................page 57 application notes ...................................................page 62 interfacing to isa bus............................................page 62 pwm motor interface ............................................page 64 16-bit parallel dac motor interface ......................page 66 performance motion devices, inc. does not assume any responsibility for use of any circuitry described in this manual, nor does it make any guarantee as to the accuracy of this manual. performance motion devices, inc. reserves the right to change the circuitry de scribed in this manual, or the manual itself, at any time. the components described in this manual are not authorized for use in life-support systems without the express written permissi on of performance motion devices, inc..
3 product family overview mc1401 series mc1231 series mc1241 series mc1451 series # of axes 4, 2, or 1 2 or 1 2 or 1 4, 2, or 1 motors supported dc servo brushless servo stepper stepper encoder format incremental (no dash version) and parallel ('-p' version) incremental incremental incremental* output format dc servo sinusoidally commutated microstepping pulse and direction s-curve profiling yes yes yes yes electronic gearing yes yes yes yes on-the-fly changes yes yes yes yes limit switches yes yes yes yes pid & feedforward yes yes - - pwm output yes yes yes - dac-compatible output yes yes yes - pulse & direction output ---yes index & home signal yes yes yes yes* chipset p/n's mc1401a, mc1401a-p (4 axes) mc1201a, mc1201a-p (2 axes) mc1101a, MC1101A-P (1 axis) mc1231a (2 axes) mc1131a (1 axis) mc1241a (2 axes) mc1141a (1 axis) mc1451a, mc1451a-e (4 axes) mc1251a, mc1251a-e (2 axes) mc1151a, mc1151a-e (1 axis) developer's kit p/n's: dk1401a, dk1401a-p dk1231a dk1241a dk1451a * optional using third i.c. ('-e' version) introduction this manual describes the operational characteristics of the mc1231a, and mc1131a motion processors. these devices are members of pmd's 1st generation motion processor family, which consists of 16 separate products organized into four groups. each of these devices are complete chip-based motion controllers. they provide trajectory generation and related motion control functions. depending on the type of motor controlled they provide servo loop closure, on-board commutation for brushless motors, and high speed pulse and direction outputs. together these products provide a software-compatible family of dedicated motion processor chips which can handle a large variety of system configurations. each of these chips utilize a similar architecture, consisting of a high- speed dsp (digital signal processor) computation unit , along with an asic (application specific integrated circuit). the computation unit contains special on-board hardware such as a multiply instruction that makes it well suited for the task of servo control. along with a similar hardware architecture these chips also share most software commands, so that software written for one chipset may be re- used with another, even though the type of motor may be different. this manual describes the operation of the mc1231a and mc1131a chipsets. for technical details on other members of pmd's 1st generation motion processors see the corresponding product manual. family summary mc1401 series (mc1401a, mc1201a, mc1101a, mc1401a-p, mc1201a-p, MC1101A-P) - these chipsets take in incremental encoder signals (standard version) or parallel word encoder signals (-p version) and output a motor command in either pwm or dac- compatible format. these chipsets come in 1, 2 or 4 axis versions and can be used with dc brushed motors, or brushless motors using external commutation. mc1231a series (mc1231a, mc1131a) - these chipsets take in incremental quadrature encoder signals and output sinusoidally commutated motor signals appropriate for driving brushless motors. they are available in one or two axis versions. depending on the motor type they output two or three phased signals per axis in either pwm or dac-compatible format. mc1241 series (mc1241a, mc1141a) - these chipsets provide internal microstepping generation for stepping motors. they are available in a one or a two-axis version. two phased signals are output per axis in either pwm or dac-compatible format. an incremental encoder signal can be input to confirm motor position. mc1451 series (mc1451a, mc1251a, mc1151a, mc1451a-e, mc1251a-e, mc1151a-e) - these chipsets provide very high speed pulse and direction signal output appropriate for driving step motor- based systems. they are available in a one, two, or four-axis version and are also available with quadrature encoder input. each of these chipsets has an associated chipset developer's kit available for it. for more information contact your pmd representative.
4 electrical characteristics overview the mc1231a consists of two 68 pin plcc's both fabricated in cmos. the peripheral input/output ic (i/o chip) is responsible for interfacing to the host processor and to the position input encoders. the command processor ic (cp chip) is responsible for all host command, trajectory, servo, and commutation computations, as well as for outputting the pwm and dac signals. the following figure shows a typical system block diagram, along with the pin connections between the i/o chip and the cp chip. encoder (1-2 axis) host processor cp i/o data4-11 i/oaddr0-3 i/owrite i/ocntrl0-3 clkout amplifier (1-2 axis) motor (4 axis) hall sensors (1 - 2 axis) the cp and i/o chips function together as one integrated motion processor. the major components connected to the chip set are the encoder (2, or 1 axes), (optionally) the motor hall-sensors (2 or 1 axes), the motor amplifier (2, or 1 axes), and the host processor. the encoder signals are input to the i/o chip in quadrature format. two signals encode the position, and an optional index signal contains a once-per-rotation locating signal. hall sensors may be connected to the chipset to provide phase initialization information, although this is not required. three hall sensor signals are input per axis. the chipset's motor output signals are connected to the motor amplifier. two types of output are provided; pwm (pulse width modulation), and dac-compatible signals used with an external dac (digital to analog converter). because the output signals are commutated, more than one motor output signal will be output per axis. see theory of operations section on sinusoidal motor commutation for details. the host processor is interfaced via an 8-bit bi-directional bus and various control signals. host communication is coordinated by a ready/busy signal, which indicates when communication is allowed. interconnections between the two chips consist of a data bus and various control and synchronization signals. the following table summarizes the signals that must be interconnected for the chipset to function properly. for each listed signal the i/o chip pin on the left side of the table is directly connected to the pin to the right. i/o chip signal name i/o chip pin cp chip signal name cp chip pin cpdata4 18 data4 50 cpdata5 5 data5 49 cpdata6 6 data6 46 cpdata7 7 data7 43 cpdata8 8 data8 40 cpdata9 17 data8 39 cpdata10 3 data10 36 cpdata11 1 data11 35 cpaddr0 68 i/oaddr0 28 cpaddr1 27 i/oaddr1 9 cpaddr2 29 i/oaddr2 6 cpaddr3 12 i/oaddr3 5 cpcntr0 20 i/ocntr0 16 cpcntr1 36 i/ocntr1 18 cpcntr2 22 i/ocntr2 68 cpcntr3 63 i/ocntr3 67 cpwrite 2 i/owrite 15 cpclk 46 clkout 19 for a complete description of all pins see the 'pin descriptions' section of this manual. absolute maximum ratings unless otherwise stated, all electrical specifications are for both the i/o and cp chips. storage temperature, ts.....................-55 deg. c to +150 deg. c supply voltage, vcc.............................-0.3 v to +7.0 v power dissipation, pd..........................650 mw (i/o and cp combined) operating ratings operating temperature, ta .................0 deg. c to +70 deg. c nominal clock frequency, fclk ...........25.0 mhz supply voltage, vcc.............................4.75 v to 5.25 v * industrial and military operating ranges also available. contact your pmd representative for more information.
5 dc electrical characteristics (vcc and ta per operating ratings, fclk = 25.0 mhz) symbol parameter min. max. units conditions vcc supply voltage 4.75 5.25 v idd supply current 100 ma open outputs input voltages vih logic 1 input voltage 2.0 vcc + 0.3 v vil logic 0 input voltage -0.3 0.8 v vihclk logic 1 voltage for clock pin (clkin) 3.0 vcc+0.3 v vihreset logic 1 voltage for reset pin (reset) 4.0 vcc+0.3 v output voltages voh logic 1 output voltage 2.4 v @cp io = 300 ua @i/o io = 4 ma vol logic 0 output voltage 0.33 v @cp io = 2 ma @i/o io = 4 ma iout tri-state output leakage current -20 20 ua 0 < vout < vcc iin input current -50 50 ua 0 < vi < vcc iinclk input current clkin -20 20 ua 0 < vi < vcc ac electrical characteristics (see reference timing diagrams) (vcc and ta per operating ratings; fclk = 25.0 mhz) (~ character indicates active low signal) timing interval t# min. max. units encoder and index pulse timing motor-phase pulse width t1 1.6 us dwell time per state t2 0.8 us index pulse setup and hold (relative to quad a and quad b low) t3 0 us reset timing stable power to reset 0.25 sec reset low pulse width 1.0 us clock timing clock frequency (fclk) 6.7 25.6 mhz clock pulse width t4 19.5 75 (note 2) ns clock period t5 39 149 (note 2) ns
6 timing interval t# min. max. units command byte write timing ~hostslct hold time t6 15 2000 (note 3) ns ~hostslct setup time t7 10 ns hostcmd setup time t8 10 ns host cmd hold time t9 25 ns hostrdy delay time t13 70 ns ~hostwrite pulse width t14 50 ns write data setup time t15 35 ns write data hold time t16 30 ns data word read timing ~hostslct hold time t6 15 2000 (note 3) ns ~hostslct setup time t7 (read only) - 20 ns hostcmd setup time t8 (read only) - 20 ns hostcmd hold time t9 25 ns read data access time t10 50 ns read data hold time t11 10 ns ~hostread high to hi-z time t12 50 ns hostrdy delay time t13 70 ns read recovery time t17 60 ns data word write timing ~hostslct hold time t6 15 2000 (note 3) ns ~hostslct setup time t7 10 ns hostcmd setup time t8 10 ns hostcmd hold time t9 25 ns hostrdy delay time t13 70 ns ~hostwrite pulse width t14 50 ns write data setup time t15 35 ns write data hold time t16 30 ns write recovery time t18 60 ns dac interface timing i/oaddr stable to ~i/owrite setup time t19 35 ns ~i/owrite pulse width t20 56 95 ns data hold time after ~i/owrite t21 17 ns clkout low to i/oaddr stable t22 10 40 ns clkout low to ~i/owrite low t23 75 92 ns clkout low to data valid t24 92 ns clkout cycle time t25 160 typical (note 4) ns i/oaddr stable to dacslct high t26 66 ns ~i/owrite low to dacslct high t27 44.5 ns pwm output timing pwm output frequency 24.5 khz note 1 ~hostslct and hostcmd may optionally be de-asserted if setup and hold times are met. note 2 chip-set performance figures and timing information valid at fclk = 25.0 only. for timing information & performance parameters at fclk < 25.0 mhz, call pmd. note 3 two micro seconds maximum to release interface before chip set responds to command note 4 clkout from cp is 1/4 frequency of clkin (cp chip).
7 i/o timing diagrams the following diagrams show the mc1231a electrical interface timing. t#' values are listed in the above timing chart. quad a quad b t1 t1 t2 t2 t3 t3 index = ~a * ~b * ~ind ~index quadrature encoder input timing clock timing t4 t4 t5 clkin
8 t7 t6 t9 t14 t15 t16 t8 command byte write timing ~hostslct hostcmd ~hostwrite hostdata0-7 hostrdy t13
9 data word read timing ~hostslct t7 t8 t17 t6 t9 t13 note 1 note 1 t11 hostcmd hostdata0-7 hostrdy ~hostread t12 t10 high-z high-z high-z high byte low byte
10 data word write timing ~hostslct t7 t8 t18 t6 t9 t15 t15 t14 t14 t13 note 1 note 1 t16 t16 hostcmd hostdata0-7 hostrdy ~hostwrite high byte low byte
11 t25 t22 t19 t20 t23 t24 t21 t27 t26 clkout i/oaddr ~i/owrite data 0-11, dacaddr0,1 dacslct dac interface timing
12 pinouts 1 9 10 26 27 43 60 44 61 1 9 10 26 27 43 60 44 61 i/o (top view) cp (top view) mc1231a pinouts cpcntrl2 cpcntrl3 hostcmd hostrdy hostread hostwrite hostslct hostintrpt hostdata0 hostdata1 hostdata2 hostdata3 hostdata4 hostdata5 hostdata6 hostdata7 cpdata4 cpdata5 cpdata6 cpdata7 cpdata8 cpdata9 cpdata10 cpdata11 cpaddr0 cpaddr1 28 42 24 13 26 30 9 23 40 35 19 39 34 16 33 46 52 45 29 12 2 20 36 quada1 quadb1 index1 home1 quada2 quadb2 index2 home2 hall1a hall1b hall1c hall2a hall2b hall2c dacslct cpclk i/oclkin i/oclkout cpaddr2 cpaddr3 cpwrite cpcntrl0 cpcntrl1 22 63 41 37 51 47 48 44 50 61 53 65 67 62 64 60 18 5 6 7 8 17 3 1 68 27 vcc 4, 21, 25, 38, 55 gnd 14, 15, 32, 49, 54, 66 i/o cp data0 data1 data2 data3 data4 data5 data6 data7 data8 data9 data10 data11 i/oaddr0 i/oaddr1 i/oaddr2 i/oaddr3 i/owrite poslimit1 poslimit2 neglimit1 neglimit2 8 7 2 1 66 65 30 29 24 19 17 16 18 68 67 64 63 62 61 pwmmag1 pwmmag2 pwmmag3 pwmmag4 pwmmag5 pwmmag6 dac16addr0 dac16addr1 clkin clkout reset i/ocntrl0 i/ocntrl1 i/ocntrl2 i/ocntrl3 daclow0 daclow1 daclow2 daclow3 60 59 58 57 50 49 46 43 40 39 36 35 28 9 6 5 15 52 45 51 44 vcc 4, 22, 33 gnd 3, 34 mc1131a pinouts hostcmd hostrdy hostread hostwrite hostslct hostintrpt hostdata0 hostdata1 hostdata2 hostdata3 hostdata4 hostdata5 hostdata6 hostdata7 cpdata4 cpdata5 cpdata6 cpdata7 cpdata8 cpdata9 cpdata10 cpdata11 28 42 24 13 40 35 19 33 46 52 45 29 12 2 20 36 22 63 68 27 quada1 quadb1 index1 home1 hall1a hall1b hall1c dacslct cpclk i/oclkin i/oclkout cpaddr2 cpaddr3 cpwrite cpcntrl0 cpcntrl1 cpcntrl2 cpcntrl3 cpaddr0 cpaddr1 41 37 51 47 48 44 50 61 53 65 67 62 64 60 18 5 6 7 8 17 3 1 vcc 4, 21, 25, 38, 55 gnd 14, 15, 32, 49, 54, 66 i/o cp data0 data1 data2 data3 data4 data5 data6 data7 data8 data9 data10 data11 i/oaddr0 i/oaddr1 i/oaddr2 i/oaddr3 i/owrite poslimit1 neglimit1 8 7 2 30 29 24 19 17 16 18 68 67 64 63 62 61 pwmmag1 pwmmag2 pwmmag3 dac16addr0 dac16addr1 clkin clkout reset i/ocntrl0 i/ocntrl1 i/ocntrl2 i/ocntrl3 daclow0 daclow1 daclow2 daclow3 60 59 58 57 50 49 46 43 40 39 36 35 28 9 6 5 15 52 51 vcc 4, 22, 33 gnd 3, 34
13 pin descriptions the following tables provide pin descriptions for the mc1231-series chipsets. ic pin name pin # description/functionality i/o chip pinouts i/o quada1 quadb1 quada2 quadb2 28 42 26 30 quadrature a, b channels for axis 1 - 2 (input). each of these 2 pairs of quadrature (a, b) signals provide the position feedback for an incremental encoder. when the encoder is moving in the positive, or forward direction, the a signal leads the b signal by 90 degs. note: many encoders require a pull-up resistor on each of these signals to establish a proper high signal (check the encoder electrical specifications) note: for mc1231a all 4 pins are valid. for mc1131a pins for axes 1 only are valid. invalid axis pins can be left unconnected i/o ~index1 ~index2 24 9 index encoder signals for axis 1-2 (input). each of these 2 signals indicate the index flag state from the encoder. a valid index pulse is recognized by the chip set when the index flag transitions low, followed by the corresponding a and b channels of the encoder transitioning low. the index pulse is recognized at the later of the a or b transitions. if not used this signal must be tied high. note: for mc1231a both pins are valid. for mc1131a pins for axes 1 only are valid. invalid axis pins can be left unconnected. i/o ~home1 ~home2 13 23 home signals for axis 1-2 (input). each of these signals provide a general purpose input to the hardware position capture mechanism. a valid home signal is recognized by the chipset when the home flag transitions low. these signals have a similar function as the ~index signals, but are not gated by the a and b encoder channels. for valid axis pins, if not used, this signal must be tied high. see below for valid pin definitions for the mc1231a and mc1131a. note: for mc1231a both pins are valid. for mc1131a pins for axes 1 only are valid. invalid axis pins can be left unconnected. i/o dacslct 33 dac select (output). this signal is asserted high to select any of the available dac output channels. for details on dac decoding see description of dac16addr0-1 signals. i/o cpclk 46 i/o chip clock (input). this signal is connected directly to the clkout pin (cp chip) and provides the clock signal for the i/o chip. the frequency of this signal is 1/4 the user-provided clkin (cp chip) frequency. i/o i/oclkin 52 phase shifted clock (input). this signal must be connected to i/oclkout (i/o chip), and inputs a phase shifted clock signal. i/o i/oclkout 45 phase shifted clock (output). this signal must be connected to i/oclkin (i/o chip), and outputs a phase shifted clock signal. i/o cpaddr0 cpaddr1 cpaddr2 cpaddr3 68 27 29 12 i/o chip to cp chip communication address (input). these 4 signals are connected to the corresponding i/oaddr0-3 pins (cp chip), and together provide addressing signals to facilitate cp to i/o chip communication. i/o ~cpwrite 2 i/o chip to cp chip communication write (input). this signal is connected to the ~i/owrite pin (cp chip) and provides a write strobe to facilitate cp to i/o chip communication. i/o cpcntrl0 cpcntrl1 cpcntrl2 cpcntrl3 20 36 22 63 i/o chip to cp chip communication control (mixed). these 4 signals are connected to the corresponding i/ocntrl0-3 pins (cp chip), and provide control signals to facilitate cp to i/o chip communication. i/o hostcmd 41 host port command (input). this signal is asserted high to write a host command to the chip set. it is asserted low to read or write a host data word to the chipset
14 ic pin name pin # description/functionality i/o hostrdy 37 host port ready/busy (output). this signal is used to synchronize communication between the dsp and the host. hostrdy will go low (indicating host port busy) at the end of a host command write or after the second byte of a data write or read. hostrdy will go high (indicating host port ready) when the command or data word has been processed and the chip set is ready for more i/o operations. all host port communications must be made with hostrdy high (indicating ready). typical busy to ready cycle is 67.5 usec, although it can be longer when host port traffic is high. i/o ~hostread 51 host port read data (input). used to indicate that a data word is being read from the chip set (low asserts read). i/o ~hostwrite 47 host port write data (input). used to indicate that a data word or command is being written to the chip set (low asserts write). i/o ~hostslct 48 host port select (input). used to select the host port for reading or writing operations (low assertion selects port). ~hostslct must remain inactive (high) when the host port is not in use. i/o ~hostintrpt 44 host interrupt (output). a low assertion on this pin indicates that a host interrupt condition exists that may require special host action. i/o hostdata0 hostdata1 hostdata2 hostdata3 hostdata4 hostdata5 hostdata6 hostdata7 50 61 53 65 67 62 64 60 host port data 0-7 (bi-directional, tri-stated). these signals form the 8 bit host data port used during communication to/from the chip set. this port is controlled by ~hostslct, ~hostwrite, ~hostread and hostcmd. i/o cpdata4 cpdata5 cpdata6 cpdata7 cpdata8 cpdata9 cpdata10 cpdata11 18 5 6 7 8 17 3 1 i/o chip to cp chip data port (bi-directional). these 8 bits are connected to the corresponding data4-11 pins on the cp chip, and facilitate communication to/from the i/o and cp chips.. i/o hall1a hall1b hall1c hall2a hall2b hall2c 40 35 19 39 34 16 hall sensor a, b, and c commutation inputs for axis 1 and 2 (input). each set of the three signals for one axis (a, b and c) encodes 6 valid signal states as follows: a on, a and b on, b on, b and c on, c on, c and a on. an on state is defined as a high signal. note: these signals should only be connected to hall sensors that are mounted 120-deg offset from each other. schemes which provide hall signals 60-deg apart will not work. note: for mc1231a all 6 pins are valid. for mc1131a pins for axis 1 only are valid. invalid axis pins can be left unconnected. i/o vcc 4, 21, 25, 38, 55 i/o chip supply voltage pin. all of these pins must be connected to the supply voltage. supply voltage = 4.75 to 5.25 v i/o gnd 14, 15, 32, 49, 54, 66 i/o chip ground pin. all of these pins must be connected to the power supply return.
15 ic pin name pin # description/functionality cp chip pinouts cp pwmmag1 pwmmag2 pwmmag3 pwmmag4 pwmmag5 pwmmag6 8 7 2 1 66 65 pwm motor output magnitude signals (output). when the chip set is in pwm output mode these pins provide the pulse width modulated magnitude signal to the motor amplifier.the pwm signals are output for each motor axis as follows: 3-phase brushless 2-phase brushless signal axis # phase signal axis # phase pwmmag1 1 a pwmmag1 1 a pwmmag2 1 b pwmmag2 1 b pwmmag3 1 c pwmmag3 2 a pwmmag4 2 a pwmmag4 2 b pwmmag5 2 b pwmmag6 2 c note: if using the mc1231a with one axis in 3-phase and the other axis in 2-phase mode, to avoid pin conflict, axis 1 should be assigned to 2-phase output, and axis 2 to 3-phase the pwm resolution is 10 bits, frequency = 24.5kz. cp poslimit1 poslimit2 52 45 positive limit switch input for axis 1-2. these signals provide directional limit inputs for the positive-side travel limit of the axis. upon powerup these signals default to "active high" interpretation, but the interpretation can be set explicitly using the set_lmt_sense command. (see host command section for more info.) if not used these signals should be tied low for the default interpretation, or tied high if the interpretation is reversed. note: for mc1231a both pins are valid. for mc1131a pins for axes 1 only are valid. invalid axis pins can be left un connected. cp neglimit1 neglimit2 51 44 negative limit switch input for axis 1-2. these signals provide directional limit inputs for the negative-side travel limit of the axis. upon powerup these signals default to "active high" interpretation, but the interpretation can be set explicitly using the set_lmt_sense command. (see host command section for more info.) if not used these signals should be tied low for the default interpretation, or tied high if the interpretation is reversed. note: for mc1231a both pins are valid. for mc1131a pins for axis 1 only are valid. invalid axis pins can be left un connected. cp dac16addr0 dac16addr1 30 29 axis address used during 16-bit dac motor command output (output). these signals encode the motor output axis address as shown in the table below (both 3-phase and 2-phase waveforms) dac16addr1 dac16addr0 addressed encoder low low axis 1 phase a low high axis 1 phase b high low axis 2 phase a high high axis 2 phase b note: when connecting to 3-phase brushless motors only two of the three required phase outputs are provided in the dac output mode. the third phase (phase c) is constructed external to the chipset, usually by the amplifier. see theory of operations for more information. to write a valid dac motor command value dacslct (i/o chip) and i/oaddr0-3 (cp chip) must be high, and i/owrite (cp chip) must be low. the 16 bit dac data word is organized as follows: high twelve bits are in data0-11 (cp chip), and low 4 bits are in daclow0-3 (cp chip). cp clkin 24 clock in (input). this pin provides the chip set master clock (fclk = 25.0 mhz)
16 ic pin name pin # description/functionality cp clkout 19 clock out (output). this pin provides a clock output which is 1/4 the clkin frequency. this pin is connected to i/oclkin (i/o chip). cp ~reset 17 master chip set reset (input). when brought low, this pin resets the chip set to its initial condition. reset should occur no less than 250 msec after stable power has been provided to the chip set. cp i/ocntrl0 i/ocntrl1 i/ocntrl2 i/ocntrl3 16 18 68 67 i/o chip to cp chip communication control (mixed). these signals are connected to the corresponding cpcntrl0-3 pins on the i/o chip, and provide control signals to facilitate cp to i/o communication. cp data0 data1 data2 data3 data4 data5 data6 data7 data8 data9 data10 data11 60 59 58 57 50 49 46 43 40 39 36 35 multi-purpose data0-11. (bi-directional). these pins have 2 functions: 1) pins data4-11 (8 bits total) are connected to the corresponding cpdata4-11 pins on the i/o chip, and are used to communicate between the cp and i/o chips 2) pins data0-11 hold the high 12 bits of the dac output value when the output mode is set to 16-bit dac. cp daclow0 daclow1 daclow2 daclow3 64 63 62 61 daclow0-3 (output). these pins hold the lowest 4 bits of the 16 bit dac output word when the output mode is set to 16 bit dac. these pins, in conjunction with data0-11 (providing the high 12 bits) make up the 16-bit dac output word. cp i/oaddr0 i/oaddr1 i/oaddr2 i/oaddr3 28 9 6 5 multi-purpose address0-3 (output). these pins are connected to the corresponding cpaddr0- 3 pins on the i/o chip. they have 2 functions; they provide addressing signals to facilitate communication between the i/o chip and cp chip, and they are used during dac data decoding. to read a valid dac value from data0-data11 (cp chip), dacslct (i/o chip) and i/oaddr0-3 (cp chip) must all be high, and i/owrite (cp chip) must be low. cp i/owrite 15 multi-purpose write (output). this pin is connected to cpwrite on the i/o chip. it has 2 functions: 1) it provides a control signal to the i/o chip to facilitate communication between the i/o chip and cp chip. 2) it is used during dac data decoding to read a valid dac value from data0-data11 (cp chip), dacslct (i/o chip) and i/oaddr0-3 (cp chip) must all be high, and i/owrite (cp chip) must be low. cp vcc 4, 22, 33 cp chip supply voltage pin. all of these pins must be connected to the supply voltage. supply voltage = 4.75 to 5,.25 v cp gnd 3, 34 cp chip ground pin. all of these pins must be connected to the power supply return.
17 theory of operations dac data incremental encoder trajectory profile generator (2) digital servo filtering (2) host i/o controller index b a internal block diagram host interrupt data control pwm ma g . dac address motor output system registers (2) 16 1/a 1/a 1/a 1/phase 2 1 8 5 quadrature decoder counter (2) index capture register (2) position register (2) host command dac, pwm signal generator (6 channels) home 1/a poslimit 1/a ne g limit 1/a commutation generator (2) i/o chip cp chip the above figure shows an internal block diagram for the mc1231a motion processor. each servo axis inputs the actual location of the axis using incremental encoder signals. these encoder signals are digitally filtered for increased reliability and then passed on to a high speed up/down counter. this counter is used to maintain a 32-bit actual axis position register. the chipset can be operated in two modes. closed loop mode, which is the normal operating mode of the chipset, performs trajectory generation, digital servo loop closure, and sinusoidal commutation. in this mode the motor output value is controlled by the servo filter. open loop mode performs commutation only. it allows the motor output value to be controlled directly by the host processor. for either operating mode the desired motor output value is then combined with the current commutation value from an internal sinusoidal lookup. the commutation angle is determined using the motor encoder. two or more commutated signals are generated for each axis, with each signal being shifted either 90 or 120 degrees from one another, depending on the motor type. the resultant commutated signals are then output to the amplifier either as pwm or dac signals. to perform continuous digital servoing, the trajectory and servo calculations are performed at every sample time for all enabled axes. the commutation is performed 4 times for each sample time. the following table summarizes the operational parameters of the mc1231a-series chipsets.
18 mc1231a-series chipset operational parameters available configurations: 2 axes with internal sinusoidal commutation (mc1231a) 1 axes with internal sinusoidal commutation (mc1131a) operating modes: closed loop (motor command is driven from output of servo filter) open loop (motor command is driven from user-programmed register) position range: -1,073,741,824 to 1,073,741,823 counts velocity range: -16,384 to 16,383 counts/sample with a resolution of 1/65,536 counts/sample acceleration range: s-curve profile: - 1/2 to + 1/2 counts/sample 2 with a resolution of 1/65,536 counts/sample 2. all others: -16,384 to 16,383 counts/sample 2 with a resolution of 1/65,536 counts/sample 2 jerk range: -1/2 to +1/2 counts/sample 3 , with a resolution of 1/4,294,967,296 counts/sample 3 trajectory profile generator modes: s-curve (host commands final position, max velocity, max acceleration, and jerk) trapezoidal (host commands final position, max velocity and acceleration) velocity contouring (host commands max. velocity, acceleration) electronic gear (encoder position of one axis is used as position command for another axis). a total of 2 electronic gears are supported (2 encoders and 1 output each). not available in mc1131a electronic gear ratio range: 32768:1 to 1:32768 (negative and positive direction) filter modes: pid+velocity feedforward and motor bias filter parameter resolution: 16 bits commutation waveform: sinusoidal phase initialization methods: hall-based algorithmic (briefly energize motor coils) microstepping (advance motor to known phase position) direct set (explicitly set current commutation angle) # of sinusoidal lookups: 256 per electrical cycle range of commutation cycle: 129 to 2,097,088 (using pre-scalar) counts per electrical cycle commutation rate: 15 khz phasing modes: 120 degrees (used with 3-phase brushless motors) 90 degrees (used with 2-phase brushless motors) # of pwm output phases: 3-phase brushless motors: 3 2-phase brushless motors: 2 # of dac output phases: 2 (all motor types) max incremental. encoder rate: 1.75 mcounts/sec servo loop rate range: 270 usec*minimum, 4,423 msec max. max servo loop rate: 270 usec* per enabled axis. # of limit switches per axis 2 (one for each direction of travel) # of position capture triggers: 2 (index, home signal) capture trigger latency: 160 nsec # of host commands: 116 *exact servo loop time is 271.36 usec, 270 is an approximation trajectory profile generation the trajectory profile generator performs calculations to determine the target position, velocity and acceleration at each servo loop. these calculations are performed using the current profile mode and profile parameters set by the host. four trajectory profile modes are supported: - s-curve point to point - trapezoidal point to point - velocity contouring - electronic gear the commands to select these profile modes are set_prfl_s_crv (to select the s-curve mode), set_prfl_trap (to select the trapezoidal mode) set_prfl_vel (to select the velocity contouring mode) and set_prfl_gear (to select the electronic gear mod). throughout this manual various command mnemonics will be shown to clarify chipset usage or provide specific examples. see the host communications section for a description of host command nomenclature.
19 the profile mode may be programmed independently for each axis. for example axis #1 may be in trapezoidal point to point mode while axis #2 is in s-curve point to point. generally, the axis should be at rest when switching profile modes. under certain conditions however, switching into certain profile modes "on-the-fly" is allowed. see specific profile descriptions for details. s-curve point to point the following table summarizes the host specified profile parameters for the s-curve point to point profile mode: profile parameter representation & range units destination position signed 32 bits -1,073,741,824 to 1,073,741,823 counts maximum velocity unsigned 32 bits* (1/2 16 scaling) 0 to 1,073,741,823 counts/smpl max. accel. unsigned 16 bits ** (1/2 16 scaling) 0 to 32,767 counts/smpl 2 jerk unsigned 32 bits *** (1/2 32 scaling) 0 to 2,147,483,647 counts/smpl 3 * uses 1/2 16 scaling. chipset expects a 32 bit number which has been scaled by a factor of 65,536 from units of counts/sample time. for example to specify a velocity of 2.75 counts/sample time, 2.75 is multiplied by 65,536 and the result is sent to the chipset as a 32 bit integer (180,224 dec. or 2c000 hex.). ** uses 1/2 16 scaling. chipset expects a 16 bit number which has been scaled by a factor of 65,536 from units of counts/sample time 2 . for example to specify an acceleration of .175 counts/sample time 2 , .175 is multiplied by 65,536 and the result is sent to the chipset as a 16 bit integer (11,469 dec. or 2ccd hex). *** uses 1/2 32 scaling. chipset expects a 32 bit number which has been scaled by a factor of 4,294,967,296 (2 32) from units of counts/sample time 3 . for example to specify a jerk value of .0075 counts/sample time 3 , .0075 is multiplied by 4,294,967,296 and the result is sent to the chipset as a 32 bit integer (32,212,256 dec. or 1eb8520 hex). use the following figure showing a typical s-curve velocity vs. time graph for reference in reading the next section: phase i. phase ii. phase iii. phase v. phase vi. phase vii. phase iv. s-curve profile the s-curve profile drives the axis at the specified jerk until the maximum acceleration is reached. (phase i). it will then drive the axis at jerk = 0 (constant acceleration) through phase ii. it will then drive the axis at the negative of the specified jerk though phase iii, such that the axis reaches the specified maximum velocity with acceleration = 0. this completes the acceleration phase. at the end of the acceleration phase of the move, the velocity will be constant, and the acceleration will be 0. at the appropriate time, the profile will then decelerate (phases v, vi and vii) symmetrically to the acceleration phase such that it arrives at the destination position with acceleration and velocity = 0. there are several conditions where the actual velocity graph of an s- curve motion will not contain all of the segments shown in the above figure. for example, if the max. acceleration is not reached before the "half-way" point to the max. velocity, then the actual velocity profile will not contain a phase ii or a phase vi segment (they will have a duration of 0 servo loops). such a profile is shown below: phase i. phase iii. phase v. phase vii. phase iv. s-curve that doesn't reach max. acceleration another such condition is if the position is specified such that max. velocity is not reached. in this case there will be no phase iv, and there may also be no phase ii and vi, depending on where the profile is "truncated". while the s-curve profile is in motion, the user is not allowed to change any of the profile parameters. the axis must be at rest before a new set of profile parameters can be executed. if parameters are changed during motion then a 'command error'
20 will occur, and all new parameters will be ignored except the position. see the section of this manual entitled "command error" for more information.. before switching to the s-curve point to point profile mode, the axis should be at a complete rest. when the axis is in the s-curve profile mode, the set_max_acc command should be used to load the max. acceleration value. the alternate acceleration loading command set_acc can not be used. trapezoidal point to point the following table summarizes the host specified profile parameters for the trapezoidal point to point profile mode: profile parameter representation & range units destination position signed 32 bits -1,073,741,824 to 1,073,741,823 counts maximum velocity unsigned 32 bits (1/2 16 scaling) 0 to 1,073,741,823 counts/smpl accel. unsigned 32 bits (1/2 16 scaling) 0 to1,073,741,823 counts/smpl 2 in the trapezoidal point to point profile mode the host specifies a destination position, a maximum velocity, and an acceleration. the trajectory is executed by accelerating at the commanded acceleration to the maximum velocity where it coasts until decelerating such that the destination position is reached with the axis at rest (zero velocity). if it is not possible to reach the maximum velocity (because deceleration must begin) then the velocity profile will have no "coasting" phase. the acceleration rate is the same as the deceleration rate. a new maximum velocity and destination position can be specified while the axis is in motion. when this occurs the axis will accelerate or decelerate toward the new destination position while attempting to satisfy the new maximum velocity condition. when in trapezoidal point to point profile mode, to change the acceleration, the axis must come to a complete stop. after this has occurred, a new acceleration value can be loaded. if the acceleration parameter is changed during motion then a 'command error' will occur, and all updated parameters will be ignored except the position. see the section of this manual entitled "command errors" for more information. before switching to the trapezoidal point to point profile mode, the axis should be at a complete rest. the following figure shows a velocity profile for a typical point to point trapezoidal move, along with a more complicated move involving on the fly changes to the maximum velocity and the destination position. simple trapezoidal mode motion complex trapezoidal mode motion change max velocity change target position vel. vel. time time velocity contouring the following table summarizes the host specified profile parameters for the velocity contouring profile mode: profile parameter representation & range units maximum velocity unsigned 32 bits (1/2 16 scaling) 0 to 1,073,741,823 counts/smpl acceleration signed 32 bits* (1/2 16 scaling) -1,073,741,824 to 1,073,741,823 counts/smpl 2 * negative numbers using 1/2 16 scaling are handled no differently than positive numbers. for example if an acceration value of -1.95 counts/sample time 2 is desired, - 1.95 is multipled by 65,536 and the result is sent to the chipset (-127,795 dec. or fffe0ccd hex). in this profile mode the host specifies two parameters, the commanded acceleration, and the maximum velocity. the trajectory is executed by continuously accelerating the axis at the commanded rate until the max. velocity is reached, or until a new acceleration command is given. the maximum velocity value must always be positive. motion direction is controlled using the acceleration value. positive acceleration values result in positive motion, and negative acceleration values result in negative motion. there are no restrictions on changing the profile parameters on the fly. note that the motion is not bounded by position however. it is the responsibility of the host to generate acceleration and max. velocity command values which result in safe motion, within acceptable position limits. the following figure shows a typical velocity profile using this mode.
21 example velocity contouring mode change max velocity change acceleration vel. time change max velocity and acceleration there are no restrictions on switching the profile mode to velocity contouring while the axis is in motion. electronic gear the following table summarizes the host specified profile parameters for the electronic gear profile mode: profile parameter representation & range units gear ratio signed 32 bits* (1/2 16 scaling) -1,073,741,824 to +1,073,741,823 - * for example to specify a gear ratio of +1.5 to 1 the value 1.5*65,536 is sent to the chipset (98,304). alternatively to set the gear ratio as -11.39 to 1 the value -11.39*65,536 is sent (- 746,455 dec. or fff49c29 hex.). in this profile mode, the host specifies one parameter, the gear ratio. the target position is generated by applying the specified gear ratio to the current position of another axis, slaving the driven axis to the axis providing the position input. the following figure shows the arrangement for encoders and motor drives in a typical electronic gearing application. master encoder slave encoder motor amplifier mc1231a motor amplifier optional because a geared axis takes up two encoder channels, the total number of geared axes supported per chipset is 1/2 the total # of axes. in addition, the master /slave axis combinations are fixed. the following chart shows the allowed master/slave combinations for each chipset: chipset p/n gear pairs (master -> slave) mc1231a #2 -> #1 mc1131a not available typically the master axis is only used for encoder input. it is possible however to use the master axis as a normal driven axis by leaving it enabled, and using one of the three trajectory modes other than electronic gear for the master axis. the net effect of this will be to run two servo motors off of the same trajectory profile (although at a different ratio if so programmed). this configuration is shown in the previous diagram as 'optional' components. using this configuration the chipset can be made to perform useful functions such as linear interpolation of two axis. there are no restrictions on changing the gear ratio when the axis is in motion, although care should be taken to select ratios such that safe motion is maintained. the specified gear ratio (set_ratio command) indicates the number of target counts generated per input encoder count. for example a gear ratio of 1.5 means 1.5 counts of the slave axis are generated for every count of the master axis. there are also no restrictions on changing to this profile mode while the axes is in motion. trajectory control normally each of the above trajectory modes will execute the specified trajectory, within the specified parameter limits, until the profile conditions are satisfied. for example for the point-to-point profile modes this means that the profile will move the axis until the final destination position has been reached, at which point the axis will have a velocity of zero. halting the trajectory in some cases however it is necessary to halt the trajectory manually, for safety reasons, or simply to achieve a particular desired profile. this can be accomplished using one of two methods; abrupt stop, or smooth stop. abrupt stops are accomplished using the stop command. this command instantaneously stops the trajectory generator by setting the velocity of the axis to zero. this control mode is typically used during an emergency stop, when no deceleration phase is desired. smooth stops are accomplished using the smooth_stop command. this command causes the trajectory to decelerate at a rate equal to the specified acceleration rate, until a velocity of zero is reached. in addition the form of the deceleration is symmetric to the acceleration
22 phase. for example if the profile mode is s-curve, and a smooth_stop command is given, the profile will decelerate in a manner exactly equal and opposite to the acceleration phase. the stop command functions in all profile modes; s-curve point- to-point, trajectory point-to-point, velocity contouring, and electronic gear. the smooth_stop functions in s-curve point-to-point, trajectory point-to-point, and velocity contouring profiling mode. it does not function in electronic gear mode. caution should be exercised when using the stop command due to the large and abrupt changes in motion that may occur. motion complete status to simplify the programming of a complete motion system it is convenient to have the motion chipset indicate when a particular profile move has been completed. this function is provided by two status bits in the chipset's status word (see the section of this manual entitled "axis status " for more information on the axis status word). these two bits are called the motion complete bit, and the in-motion bit. the motion complete bit is controlled interactively by the chipset and the host. after a motion has completed, the chipset sets the motion complete bit on. the host may then poll this bit to determine that motion is complete, or if desired, the host can program the chipset to automatically signal when the motion is complete (using an interrupt). in either case once the host has recognized that the motion has been completed the host clears the motion complete bit, enabling the bit to indicate the end of motion for the next move. the following list shows the conditions that will cause the motion complete bit to occur: - profile has reached the destination position (point-to-point profile modes only) - axis trajectory reaches a velocity of zero and the current velocity command is zero - smooth_stop command is given and axis trajectory reaches a velocity of zero - stop command is given - limit switch condition occurs the in-motion bit is similar to the motion complete bit except that it continuously indicates the status of the axis without interaction with the host. in addition this bit is used exclusively for polled mode operations. it can not cause an interrupt to the host to be generated. the motion complete and the in-motion indicator bits function in the s-curve point-to-point, trapezoidal point-to-point, and velocity contouring profile modes only. they do not function when the profile mode is set to electronic gearing. the motion complete and in-motion bits indicate the state of the trajectory generator, not the actual motor. even if the trajectory generator has completed a motion, the actual axis position may or may not be at rest depending on servo lag, stability, and other system conditions. digital servo filtering a digital filter is available for use in calculating a motor output signal. the filter used is a pid (proportional, integral, derivative) filter, along with a velocity feedforward term and a term to adjust the offset, also called the dc bias value. this filter type is known as a pid+vff filter. this filter uses programmable gain values which can be tuned to provide excellent control accuracy and stability over a large range of systems. the following schematic diagram shows the computational flow for the pid+vff digital filter. proportional term p = en * kp actual position from encoder target position integral term i = (s+en)*ki s = s+en derivative term d = (en-e(n-1))*kd target velocity + - + + + + output to motor kvff bias + in the pid+vff filter, the host-specified parameters are: symbol name representation & range kp proportional gain unsigned 16 bits (0 to 32767) ki integral gain unsigned 16 bits (0 to 32767) kd derivative gain unsigned 16 bits (0 to 32767) ilim integration limit unsigned 16 bits (0 to 32767) kvff velocity feedforward gain unsigned 16 bits (0 to 32767) mtrbias dc motor offset signed 16 bits (-32767 to 32767) the pid+vff filter is calculated as follows: position error n = e n = tp n - ap n output n = e n *kp + (e n -e n-1 )*kd + int(e n )*ki/256 + trgtvel*kvff/4 + mtrbias
23 where: e n is the position error at sample time n tp n is the target position at sample time n ap n is the actual position at sample time n int(e n ) is the integration sum at time sample n trgtvel is the current desired velocity in counts/sample mtrbias is the motor bias value all multiplied error quantities are saturated to fit within a 16 bit number so that no discontinuities in the output signal occur at values beyond +/- 2 15 . the integral term is actually maintained to an accuracy of 24 bits, but only the top 16 bits are used. this results in a more useful range for ki, the integral gain. the result of this calculation is a 16 bit number. the top 10 bits of this result become the output value if the motor output mode is pwm (10 bits magnitude), and the entire word is used if the mode is dac16. care should be taken when setting a ki value for the first time. if the system has already been running and the integration value is unknown, an abrupt 'jump' may occur when the ki value is set to a non-zero value. to avoid this set the i_lm (integration limit) to 0, set the ki to the desired value, and then set i_lm to the desired integration limit value. this will 'clear' all prior integration values, smoothly enabling the integration function from that point forward. motor limit in addition to setting various pid gain values the mc1231a also allows the maximum value output by the filter to be set. this motor limit value is set using the command set_mtr_lmt. it can be read back using the command get_mtr_lmt. the specified motor limit affects the filter output such that if the magnitude of the filter output value (positive as well as negative) exceeds the motor limit than the output value is maintained at the motor limit value. once the filter output value returns below the specified limit than normal servo filter values are output the motor limit is only applied during closed loop servo operations, when the servo filter controls the motor output value. it does not affect the output motor value applied during open loop operations motor bias when using an axis which has a net force in one direction or the other (such as a vertical axis which experiences the force of gravity) the motor bias function of the pid compensation filter may be useful. by adding a constant bias value to the filter output, the overall position error of the filter can be reduced by directly compensating for the constant force. the motor bias value is set using the command set_mtr_bias. it can be read back using the command get_mtr_bias. the motor bias value is applied to the filter value at all times when the chipset is in closed loop mode. if the chipset transitions to open loop mode (mtr_off command is given or a motion error occurs with automatic motor stop enabled) than the motor bias value will be output to the motor by itself, until a manual motor command value is given (set_mtr_cmd command), at which point this host-provided motor command value, without modification by the motor bias value, becomes the active motor command. the following example illustrates this: if the chipset is in closed loop mode with a motor bias value of 100, then if a motor off command is given (mtr_off), then the output motor command will be exactly 100. thereafter if the host sends a manual motor command of 200 (using the set_mtr_cmd command), then the output motor command will be 200. at this instant the chipset is returned to closed loop mode however (mtr_on command), the motor bias value will again be added to the filter output. if the specified motor bias value does not properly compensate for the offsetting dc load, then after a motion error with automatic motor stop enabled or after a mtr_off command the axis may move suddenly in one direction or another. it is the responsibility of the host to select a motor bias value such that safe motion is maintained. parameter loading & updating various profile & servo parameters must be specified by the host for an axis to be controlled in the desired manner. to facilitate precisely synchronized motion, these parameters and related control commands are loaded into the chip using a double-buffered scheme. in this scheme, the parameters and action commands being loaded are not acted upon (copied from the double-buffered to the active registers) until an update signal is given. this update signal can consist of either a "manual" update command, or one of several conditional breakpoints. whichever update method is used, at the time the update occurs, all of the double buffered registers and commands will be copied to the active registers. conversely, before the update occurs, loading the double-buffered registers or executing the double buffered commands will have no effect on the system behavior. the double buffered registers are listed below.
24 register name command to set destination position set_pos maximum velocity set_vel acceleration set_acc maximum acceleration set_max_acc jerk set_jerk ratio set_ratio kp set_kp ki set_ki kd set_kd kvff set_kvff integration limit set_i_lm the double-buffered commands are: stop, smooth_stop, and synch_prfl. manual update there are two methods of manually updating the double-buffered parameters, one for a single axis instantaneous update and one for a multiple-axis update. the single axis instantaneous update, which is specified using the update command, forces the parameters for the current axis to be updated at the next servo loop. the multiple axis instantaneous update, which is specified using the multi_update command, causes multiple axes to be updated simultaneously. this can be useful when synchronized multi-axis profiling is desired. this command takes a 1 word argument which consists of a bit mask, with 1 bit assigned to each axis. executing this command has the same affect as instantaneously switching to each desired axes, and executing an update command. breakpoints a breakpoint is a convenient way of programming a profile or filter change upon some specific condition. there are two types of breakpoints, those that have a 32-bit comparitor value associated with them and those that do not. for those that have the comparitor, a 32-bit comparitor value is loaded into the breakpoint compare register first, and then one of the breakpoint conditions is specified. for those breakpoint modes without associated comparitor values only the breakpoint condition needs to be specified. the double-buffered registers and commands will be updated upon satisfaction of the specified breakpoint condition. here is a list of all of the available breakpoint conditions. positive target position breakpoint a 32 bit position breakpoint can be specified which will result in the parameters being updated when the current target position (the instantaneous desired axis position output from the profile generator) equals or exceeds the specified breakpoint value. this breakpoint is set using the set_pos_brk command. negative target position breakpoint:. a 32 bit position breakpoint can be specified which will result in the parameters being updated when the current target position (the instantaneous desired axis position output from the profile generator) equals or is less than the specified breakpoint value.this breakpoint is set using the set_neg_brk command. positive actual position breakpoint a 32 bit position breakpoint can be specified which will result in the parameters being updated when the current actual position (the instantaneous position of the actual axis hardware) equals or exceeds the specified breakpoint value.this breakpoint is set using the set_actl_pos_brk command. negative actual position breakpoint:. a 32 bit position breakpoint can be specified which will result in the parameters being updated when the current actual position (the instantaneous position of the actual axis hardware) equals or is less than the specified breakpoint value.this breakpoint is set using the set_actl_neg_brk command. time breakpoint a 32 bit time breakpoint can be specified which will result in the parameters being updated when the # of servo loops executed since chip set reset (the current chip set time) is equal to the time breakpoint value.the # of servo loops continuously increases until it rolls over from 2 32 - 1 back to 0.the time breakpoint is set using the set_time_brk command. motion complete breakpoint a breakpoint can be specified which will result in the parameters being updated when the previous motion has been completed (motion complete bit is set). when using this breakpoint no 32 bit compare value is required. external breakpoint a breakpoint can be specified which will result in the parameters being updated when the home signal of the corresponding axis becomes active (low). when using this breakpoint no 32 bit compare value is required. this breakpoint is useful whenever it is desired that an external signal starts, stops, or otherwise modifies the profile movement. normally, whenever one of these conditions has been programmed and the condition occurs, the double-buffered parameters will automatically be shifted to the active registers. there is a mechanism to disable this "automatic update upon breakpoint" however. this is discussed in the next section. the above breakpoint modes are particularly useful during multi-axis motion. this is because the next profile commands (set of host- specified trajectory commands) can be pre-loaded and activated at the precise position or time required, with no delay incurred to send an update or load parameters command.
25 after a breakpoint condition has been satisfied it is no longer active. to set up another breakpoint condition, a new one must be explicitly set by the host. the double-buffered registers that are shifted to the active registers do not change upon being shifted, only the active registers change. except for the multi_axis command, parameter loading and updating is controlled individually for each axis. in addition each axis has a separate 32-bit breakpoint register, and can be set to various individual breakpoint conditions. external breakpoints and homing by connecting a home input sensor to the home signal input of the mc1231-series chipsets it is possible to cause the chipset to halt a motion at the moment it receives the home signal. this capability makes it ideal for performing a home sequence. the following host i/o sequence illustrates this: get_home ; check to make sure axis not already at ; home. if so, then a 'reverse' move must ; be made to retract axis from home switch. ; this 'reverse' sequence is not indicated ; here for simplicity sake set_capt_home ; set trigger capture to home signal clr_status ; clear status register get_capt ; clear out any previous captures set_pos 12345 ; load home move parameters set_vel 23456 set_acc 345 update ; start home move set_ext_brk ; initiate external breakpoint mode smooth_stop ; load (but do not update) a stop command this sequence will start a homing move which will come to a smooth stop as soon as the axis encounters the home switch. in addition the capture register will be loaded with the exact location of the home sensor. this register can be used in conjunction with the get_actl_pos and set_actl_pos commands to set the position to any desired location. for example if it is desired that the home sensor be located at a position of 0, then the new position should be set to the current actual axis position minus the capture position. this is shown in the sequence below, which should be executed after the axis has come to a stop. current_pos = get_actl_pos capture_pos = get_capt set_actl_pos (current _pos - capture_pos) as is the case for all of the breakpoint modes, the external breakpoint can not only be used to stop an ongoing move, but to start or otherwise modify a move as well. this flexibility makes it well suited for applications such as cut-on-the-fly or other externally-initiated motions. disabling automatic profile update normally, when a breakpoint condition has been satisfied, it causes the profile & filter parameters to be automatically updated. for certain types of profiles however, it may be desirable to still use the breakpoint mechanism (to allow it to generate a host interrupt for example), but not to have the profile update. whether the profiles are automatically updated or not for a given axis is controlled by the commands set_auto_update_on and set_auto_update_off. when auto update is set to on, the breakpoint/profile mechanism behaves as described above. when set to off, upon a breakpoint condition, no profile update will occur. when in this mode the only way to update the profile is to use the update command or the multi_update command. travel limit switches the mc1231-series chipsets support motion travel limit switches that can be used to automatically recognize an "end of travel" condition. the following figure shows a schematic representation of an axis with travel-limit switches installed, indicating the "legal" motion area and the over-travel regions. legal travel region positive over-travel region negative over-travel region positive limit switch negative limit switch there are two primary services that the mc1231a provides in connection with the over-travel limit switch inputs: 1) the host can be automatically notified that an axis has entered an over-travel condition, allowing the host to take appropriate special action to manage the over-travel condition. 2) upon entering an over-travel condition, the trajectory generator will automatically be halted, so that the motor does not travel further into the over travel region. to recover from an over-travel condition the corresponding status bits in the status word should be reset (see the section of this manual on axis status for details on resetting status word bits). once this has been performed the host can command a trajectory move to bring the axis out of the over-travel region. the over-travel detector is 're-armed' when the axis exits the over travel condition. only one over-travel signal can be processed at a time. for example if the negative over travel switch becomes active, the corresponding status bits must be cleared, and the axis moved
26 into the legal travel range before a positive over travel switch will be recognized. motion error detection and recovery under certain circumstances, the actual axis position may differ from the target (desired) axis position by an excessive amount. such an excessive position error often indicates a potentially dangerous condition such as motor or encoder failure, or excessive mechanical friction. to detect this condition, thereby increasing safety and equipment longevity, the mc1231a includes a programmable maximum position error. the maximum position error is set using the command set_pos_err, and read back using the command get_pos_err. to determine whether a motion error has occurred the maximum position error is continuously compared against the actual position error. if the maximum position error value is exceeded, then the axis is said to be in "motion error". when this occurs the motion error bit in the axis status word is set, and the axis motor may be turned off, depending on the state of the automatic motor shutdown mode (see set_auto_stop_on and set_auto_stop_off host command descriptions). at the moment motion error occurs several events occur simultaneously. the following list describes these events: - motion error bit of the axis status word is set - if automatic motor stop is enabled the motor is set off (set to open loop control mode) - if the automatic stop is enabled the trajectory generator is stopped if the automatic motor stop mode is not set than only the motion error status bit is set. recovering from a motion error to recover from a motion error which results in the motor being turned off, the following sequence should be performed: 1) determine cause of motion error and correct problem (this may require human intervention). 2) turn motor on using mtr_on command. after the above sequence, the axis will be servoing correctly, and the profile generator will be at rest, ready for another move. servo loop control & timing each of the axes on the mc1231-series chipsets can be individually enabled or disabled *. each enabled axis receives a "time slice" of the available computation power of the cp chip. * this is true even for the mc1131a, which has only one axis, although generally disabling the only axis has no utility. disabled axes do not use any computing power; thus it is possible to increase the servo loop rate when less than the supported number of axes are used. to set the servo loop rate to a value other than the default value, use the command set_smpl_time. the value get_smpl_time can be used to read this value back from the chipset. the formula for determining the minimum loop time (maximum sampling frequency) for a given number of enabled axis is 135 usec for each enabled axis. the following table summarizes the minimum loop time for the standard and -p parts. # axes enabled minimum time 2 540* 1 270** the loop time is specified to the chip set as an integer number from 1 to 32,767 with units of 135*** usec for example to set the standard mc1231a part for the minimum loop time with two axes enabled, a value of 4 (4*135 = 540 usec) would be sent to the chipset using the set_smpl_time command. * actual value = 542.72 usec, 540 is an approximation ** actual value = 271.36 usec, 270 is an approximation *** actual value = 135.68 usec, 135 is an approximation changing the loop time to increase servo loop rate when axes are disabled is not required. it is available as an option if greater loop speed is desired. the servo loop rate should generally not be changed while axes are in motion. it is the responsibility of the host to insure that the servo loop rate that is commanded can be supported for the # of axes enabled. failure to observe the maximums specified in the above table may result in unexpected axis behavior.
27 host communications electrical interface the mc1231a communicates to the host processor via an 8-bit bi- directional data port. 5* additional signals are used to synchronize communication operations. the following table gives a brief description of the control signals used during host communication: signal description ~hostslct selects the host port for operations ~hostwrite writes a byte of data (or a command) to the chip set. a write operation can only occur when the ready/busy line indicates ready ~hostread reads a byte of data from the chip set. a read operation can only occur when the ready/busy line indicates ready hostcmd is asserted in combination with the hostwrite signal when a command is being written to the chip set. hostrdy indicates to the host that the host port is available for operations *an additional signal, hostintrpt is provided to the host. this signal is not used directly in communication operations, and is discussed in a separate section three types of hardware communication operations are possible between the host processor and the chip set; command write, data write and data read. each of these operations transfers information to or from the chip set, and is coordinated using the 5 control signals listed above. a command write operation involves the transfer of a single byte command to the chip set. to perform a write command operation, the desired command is loaded on the 8 data pins and ~hostslct and ~hostwrite are brought low, while hostcmd is brought high. a data write operation involves the transfer of two bytes of data (1 word) to the chip set. to transfer the first byte (high byte), the desired data byte is loaded on the 8 data bits and ~hostslct, ~hostwrite and hostcmd are brought low. the hostwrite signal is then brought high to end the transfer of the first byte. to transfer the second byte (low byte), the desired data byte is loaded on the 8 data bits and ~hostslct, ~hostwrite and hostcmd are again brought low. a data read operation involves the transfer of two bytes of data (1 word) from the chip set to the host. to transfer the first (high) byte, ~hostslct, ~hostread,and ~hostcmd signals should be brought low, and the data should be read from the 8 bit data bus. the hostread signal is then brought high to end the transfer of the first byte. to transfer the second (low) byte, ~hostslct, ~hostread, and ~hostcmd are again brought low and the data should be read from the data bus. before any command write, data write or data read operations are performed, the user must check that the hostrdy signal indicates ready. after a command write, or after the second byte of each read or write, this signal will go busy. it will return to ready when the chipset can receive another i/o operation. for more specific electrical information on the host interface operations, see the pin descriptions and the timing diagram. packet format all communications to/from the chip set take the form of packets. a packet is a sequence of transfers to/from the host resulting in a chip set action or data transfer. packets can consist of a command with no data (dataless command), a command with associated data that is written to the chip set (write command) or a command with associated data that is read from the chip set (read command). all commands with associated data (read or write) have either 1 or 2 words of data. see the host commands section for more information on the length of specific commands. if a read or a write command has 2 words of associated data (a 32 bit quantity) the high word is loaded/read first, and the low word is loaded/read second. the following charts show the generic command packet sequence for a dataless command, a write command, and a read command. the hardware communication operation described in the previous section to accomplish each type of transfer is shown in the left column. dataless command time --> --> --> --> cmd write: cmd byte data write: data read: [pkt checksum] write command time --> --> --> --> cmd write: cmd byte data write: word 1 [word 2] data read: [pkt checksum] read command time --> --> --> -> cmd write: cmd byte data write: data read: word 1 [word 2] [pkt checksum] [ ] indicates an optional operation
28 packet checksum the above charts show that at the end of each packet, a checksum word is available for reading. although host to chip set i/o operations are extremely reliable, for critical applications the checksum can provide a further reliability enhancement (particularly in very noisy electrical environments, or when the communication signals are routed over a media that may have data losses such as a serial link). this checksum consists of a 16-bit sum of all previous communications that have occurred for the associated command. the command byte is included in the low byte of the 1st checksum word (high byte set to 0). data words are added as is to the checksum value. for example if a set_vel command (which takes two 16-bit words of data) was sent with a data value of fedcba98 (hex), the checksum would be: 0011 (code for set_vel command) + fedc (high data word) + ba98 (low data word) ---------- 1b985 check sum = b985 (keep bottom 16 bits only) reading the checksum is optional. recovering from an incorrect packet transfer (bad checksum) will depend on the nature of the packet. read and write operations can always be re-transmitted, while a command resulting in an action may or may not be re-tried, depending on the command and the state of the axis. illegal commands when the mc1231a receives a command that is illegal (see host command summary for listing of illegal commands), it will signal this condition by returning a checksum of 0, regardless of the illegal command value or the value of any subsequent data written to the host as part of the illegal command sequence. in this manner the host processor checksum can be used to detect communication problems as well as an illegal command sequence, resulting in a simplification of the host processor communication code. command errors if a command, or command sequence is sent to the chipset that is not valid at a given operating condition of the chipset, but is valid at other times, this command is said to cause a command error. when a command error occurs this condition is indicated by the 'command error' bit of the axis status word (see the section of this manual entitled "axis status" for more information on the axis status word). the following list indicates the command sequences that result in a command error: - changing and updating the acceleration (set_acc, update) when in the trapezoidal profile mode and when the axis trajectory is still in motion. - changing and updating either the velocity, max acceleration, or jerk (set_vel or set_max_acc or set_jerk, and then update) when in the s-curve profiling mode and when the trajectory is in motion - commanding a move in the same direction as a limit switch condition when in trapezoidal or s-curve profile mode. for example if travelling in the positive direction and a limit switch is encountered, a further move in the positive direction will be ignored and a command error will be generated. once a command error occurs the command error bit is set, and the illegal profile changes are ignored. if additional parameters are also changed such as position or any filter values as part of the same update command then these parameters will not be rejected at the time of the update, and they will become the active values. axis addressing most chip set commands alter the parameters or the operating state of one axis at a time. in this way each axis can be controlled separately. to facilitate efficient communication for these types of commands, the chip set maintains the concept of a current axis number, which can be set explicitly by the host. after setting the current axis number, commands that are addressed to the current axis will automatically operate on this axis. the current axis number will stay the same until it is changed by one of the commands that alter the current axis number. as an illustration of this, the following sequence sets the current axis to #2, updates some motion parameters, and switches to axis #1, and alters some other motion parameters. set_2 -> sets current axis to #2 set_pos 02345678 -> loads current axis (#2) dest. position with value of 2345678 update - > causes the loaded value to take effect (axis # 2) set_1 -> sets current axis to #1 set_accel 00001234 -> loads current axis (#1) with acceleration value 1234 update - > causes the loaded value to take effect (axis # 1)
29 axis status the mc1231a supports a status word for each axis, which contains various information about the state of the axis. the status word is a 16-bit register which can be queried using the command get_status. it contains the following information (bit encoding is 0 = lsb, 15 = msb): bit # description 0 motion complete flag. this bit is set (1) when the axis trajectory has completed. this flag is only valid for the s- curve and trapezoidal, and velocity contouring profile modes. 1 wrap-around condition flag. this bit is set (1) when the axis has reached the end of its travel range,and has wrapped to the other end of the travel range. specifically, when travelling in a positive direction past the position +1,073,741,823, the axis will wrap to position - 1,073,741,824, and vice-versa. 2 breakpoint reached flag. this bit is set (1) when one of the breakpoint conditions has occurred. 3 index pulse received flag. this bit is set (1) when an index pulse has been received. 4 motion error flag. this bit is set (1) when the position error is exceeded (see filter section for more information). this bit can only be reset when the axis is no longer in a motion error condition 5 positive limit switch flag. this bit is set (1) when the positive limit switch goes active. 6 negative limit switch flag. this bit is set (1) when the negative limit switch goes active. 7 command error flag. this bit is set (1) when a command error has occurred. 8 motor on/off status (1 indicates motor is on, 0 indicates motor is off). 9 axis on/off status (1 indicates on, 0 indicates off). 10 in-motion flag. this bit continuously indicates whether or not the axis trajectory is in motion. this bit is set (1) when the axis is in motion, and cleared (0) when the axis trajectory is not in motion. 11 commutation error flag. this bit is set (1) when a commutation error is detected. 12,13 current axis # (13 bit = high bit, 12 bit = low bit). therefore axis encoding is as follows: bit 13 bit12 axis 001 012 14,15 reserved (may contain 0 or 1) bits 8-10 and 12-13 indicate continuous status information, and do not need to be reset by the host. bits 0-7 and bit 11 indicate various status flags that can also generate host interrupts (see next section for details). these flags are set by the chipset, and must be reset by the host (they will not be cleared by the chipset). bits 0-7 and 11 of the status word operate using a set/reset mechanism. these flags are set by the chipset, and must be reset by the host. if they are not reset by the host they will remain active indefinitely. miscellaneous mode status word there is another status word available that indicates the current status of various mode settings or conditions. the miscellaneous mode status word is a 16-bit register which can be queried using the command get_mode. it contains the following information (bit encoding is 0 = lsb, 15 = msb): bit # description 0-6 used internally by chipset. contains no host-useable information. 7 stop on motion error mode flag. this bit indicates the state of the stop on motion error mode, set by the commands set_auto_stop_on and set_auto_stop_off. a 1 indicates auto stop is on. 8-9 used internally by chipset. contains no host-useable information. 10 auto update flag. this bit indicates the state of the auto update mode, set using the commands set_auto_update_on and set_auto_update_off. a 1 indicates that auto update is disabled. 11,12 trajectory generator mode. this bit indicates the mode of the trajectory generator, set using the commands set_prfl_s_crv, set_prfl_trap, set_prfl_vel, set_prfl_gear. the encoding is as follows: bit 12 bit11 profile mode 0 0 trapezoidal 0 1 velocity contouring 10s-curve 1 1 electronic gear 13-15 phase #. these bits indicate the current phase # of the s- curve profile (only valid if the current profile mode is s- curve). a 0 indicates that the profile has not started yet, and phases 1-7 indicate the phase #'s corresponding to the phases described in the s-curve profiling mode. the 3-bit phase # word is encoded bit 15 msb, and bit 13 lsb. host interrupts in many situations, during axis motion or at other times, it is useful to have the chip set signal the host that a special condition has occurred. this is generally more convenient and efficient than having the host poll the chip set for various possible conditions. this chip set-initiated signal is known as a host interrupt. several chip set conditions may occur that can result in the generation of a host interrupt. whether these conditions in fact interrupt the host is
30 controllable for each condition and for each axis. the mechanism used to control each condition is a mask register. the interrupt conditions correspond to bits 0-7 and 11 of the status register (the axis event flags), described in the previous section. these conditions are summarized below: motion complete occurs when the profile is complete wrap-around condition occurs when the axis position wraps. break point reached occurs when a breakpoint condition has been satisfied. position capture received occurs when the encoder index pulse or home pulse has been captured motion error occurs when the maximum position error set for a particular axis has been exceeded negative limit switch occurs when the negative over-travel limit switch is active positive limit switch occurs when the positive over travel limit switch is active command error occurs when a host communication sequence causes a command error condition when one of these interrupt conditions occur for a particular axis, the host interrupt line is made active. at this point the host can respond to the interrupt (although the current i/o operation should be completed), but it is not required to do so when the host has completed processing the interrupt, it sends a command that clears the interrupt conditions for a particular axis, the rst_intrpt command. this command includes a "clearing mask" as an argument, which allows one interrupt to be cleared at a time. bits cleared by the rst_intrpt command are the exact same bits as those cleared by non-interrupt commands such as rst_status and clr_status. in each case the bits affected are the status word bits 0-7 and 11. interrupts occur for a particular axis. if the user is currently programming parameters on axis #1 and an interrupt occurs on axis #2, it is the host's responsibility to change axis number to 2 if this is the appropriate response to an interrupt on that axis. if more than one axis interrupt condition becomes active at exactly the same time, then the axis with the lowest number will generate the interrupt first. the following host commands are used in managing interrupts: (see host command reference for complete information) set_intrpt_mask sets the interrupt conditions mask get_intrpt returns the status of the interrupting axis (including the interrupting axis #). the current axis # is not altered by this command set_i changes the current axis # to the interrupting axis. this is a 'time saver' command which performs the dual operations of getting the interrupting axis # and switching to that axis in one command. rst_intrpt clears particular conditions for the interrupting axis. the current axis # is not altered by this command. to facilitate determining the nature of the interrupt, the status register holds the axis #, allowing the interrupting axis # to be determined. the following represents a typical sequence of interrupt conditions and host responses. assume for the purposes of this example that an axis (not the current axis) has hit a "hard stop" causing an essentially instantaneous motion error, as well as a positive limit switch trip. also assume that the interrupt mask for this axis was set so that either motion errors or limit switch trips will cause an interrupt event host action motion error & limit switch trip generates interrupt host sends set_i command interrupting axis status returned by chipset, current axis set to interrupting axis. host detects motion error & limit switch flags are set, recovers from motion error first. host sends: rst_intrpt 00ef, clearing motion error bit chipset clears motion error bit and disables host interrupt line - because limit switch interrupt is still active chipset immediately generates interrupt for limit switch host sends set_i command interrupting axis status returned by chipset, current axis set to interrupting axis. host detects that neg. limit switch trip flag is set, performs recovery for limit switch trip. host sends rst_intrpt 00df, clearing pos. limit switch bit chipset clears limit switch bit and disables host interrupt line - at the end of this sequence, all status bits are clear, the interrupt line is inactive, and no interrupts are pending. note that it is not required to process multiple interrupts separately (as is shown in the example). it is perfectly valid to process 2 or more interrupt conditions at the same time, and to then send a rst_intrpt command with a mask that clears multiple bits at the same time.
31 the rst_intrpt and get_i commands are only effective when there is an interrupt present. if no interrupt is present than alternative 'polled-mode' commands such as rst_status or get_status should be used. encoder position feedback the mc1231a-series of chipsets support direct input of incremental encoder signals. four position input and control signals are supported: - a quadrature channel - b quadrature channel - index pulse - home signal the a and b signals are used to continuously maintain the position of the motor, and the index and home signals are used as trigger inputs to a high-speed position capture mechanism. each quadrature channel consists of a square wave offset 90 deg. from the other. positive motion consists of the a channel leading the b channel by 90 deg., and negative motion consists of the a channel lagging the b channel by 90 deg. for each full phase of one channel, four resolved quadrature counts will occur, resulting in a 4 to 1 resolution enhancement over the basic channel resolution. the index pulse is typically located on the encoder and will be active once per revolution. the chip set recognizes that an index trigger has occurred (i.e. when the 32-bit index location is captured) when the index signal, as well as the a and b signals transition low. the home signal is typically connected to a position reference sensor, or to any other general purpose synchronizing signal. the home signal is recognized when it alone transitions low. the state of the a and b signals does not affect home signal trigger recognition. encoder filtering to enhance reliability of the received encoder information the mc1231a provides digital filtering of the quadrature data lines (a and b quadrature count) as well as the index and home signals. for all of these signals a valid high or low condition is recognized only when the condition has been maintained for 3 clock cycles of 160 nsec each (total required duration of 480 nsec) for example if a brief spurious noise signal on one of the lines occurs for 300 nsec, then this noise will be rejected until a valid state change lasting over 480nsec occurs. high speed position capture each axis of the mc1231a supports a high speed position capture register that allows the current axis location to be saved using an external trigger signal. when in incremental encoder mode, the mc1231a allows either the index signal or the home signal to be used as the capture trigger. these two input triggers differ however in that the index signal will cause a position capture when it, as well as the a and b index signals, transition low, while the home signal will result in a capture when it alone goes low. the commands set_capt_index and set_capt_home select which input signal is used. after an index or home signal has been captured by the mc1231a, the capture value must be read by the host processor before another position capture can occur. in addition, if the index signal is being used as the trigger, the index signal,along with the a and b quadrature signals, must transition high before another index pulse can be registered. the captured position is equal to the axis position at the moment the trigger pulse was encountered. note that the capture register is located in hardware. its accuracy is therefore not affected by the velocity of the axis. index pulses and commutation in addition to providing one of the two sources for the high speed position capture the index-signal has an additional function which is to maintain synchronization during commutation. although this function is optional, if connected, the index signal can improve the reliability of sinusoidal commutation by eliminating any long term drift due to lost encoder counts. to utilize this function it is simply necessary to use an index pulse which occurs once per motor rotation (rotary motor), or at the same point within the commutation electrical cycle (linear motor). for more information see the section of this manual entitled "sinusoidal commutation". motor outputs the mc1231a series of chipsets provides two different motor amplifier interfaces: - 10-bit 24.5 khz pwm interface - 16-bit dac output. the output mode is host-selectable. the selected method affects all axes (motor output mode is not individually programmable for each axis). the host commands to select these output modes are set_output_pwm (to select pwm mode), and set_output_dac16 (to select 16 bit dac mode).
32 motor output control the following diagram shows the control flow for the motor command output by the chipset. trajectory generator actual position m otor command register (set_mtr_cmd) to amp. servo filter (pid or pivff) mtr_on mtr_of f pwm or dac signal generator sinusoidal commutator the chipset can be run in either closed loop mode, or open loop mode. in closed loop mode the motor command is determined by the output of the servo filter, which in turn is determined by the output of the trajectory generator and the actual axis position. closed loop mode is the normal operating mode of the chipset. open loop mode allows the motor command to be directly set by the host. open loop mode is typically used when one or more axes require torque control only, or to calibrate the amplifier. whether or not the motor command comes from the servo filter (closed loop mode) or the motor command register (open loop mode), the motor command is then commutated based on the encoder position and commutation parameters specified by the host. see the section of this manual on commutation for more details. here is a summary of the motor control commands. command description mtr_on enables closed loop servo control. in this mode the source of motor command is the servo filter and the motor command register has not effect. mtr_off disables closed loop servo operations. in this mode the motor command is determined by the motor command register, which is set by the host. set_mtr_cmd sets the motor command register, used to control the motor output value during open loop operations. for this command to take effect the motor must be off (mtr_off command). set_buf_mtr_cmd double buffered version of set_mtr_cmd. for this command to take effect the motor must be off (mtr_off command), and an update command must be given get_mtr_cmd retrieves the current motor command output by the chipset. when in closed loop mode this command will return the current output value of the servo filter. when in open loop mode this command will return the value set using the set_mtr_cmd command, or set_buf_mtr_cmd after an update. get_buf_mtr_cmd retrieves the buffered motor value set using the set_buf_mtr_cmd. sinusoidal commutation in addition to trajectory generation and servo loop closure the mc1231a chipset provides sinusoidal motor commutation of 3 and 2- phase brushless motors. the following diagram shows an overview of the control flow of the sinusoidal commutation portion of the mc1231a chipset: target pos. & vel. (from profile generator) actual position phase a command phase b command phase c command motor command register (set_mtr_cmd) actual position (if encoder-based) to amp. motor output (pwm or dac16) actual position (from encoder) actual velocity (for phase advance) servo filter (pid or pivff) mtr_on mtr_of f the commutation portion of the chipset uses as input the motor command signal from either the servo filter, or the motor command register (depending on whether the chipset is in closed loop or open loop mode). this pre-commutated command signal is then multiplied by commutation values derived from an internal lookup sin/cos table. the commutation angle used in the sin/cos lookup is determined by the position encoder as well as parameters set by the host processor which relate the specific encoder used to the motor magnetic poles. two commutation waveforms are provided, one appropriate for 3-phase devices with 120 deg. separation between phases (such as brushless motors), and one appropriate for 2-phase devices with 90 deg. separation between phases (such as stepper motors). other features of the mc1231a chipset are the ability to use hall- sensor inputs for phase initialization, to use an index pulse to maintain commutation synchronization, to pre-scale the encoder input to support a wider variety of feedback devices, and to provide velocity-based phase advance for smoother and more efficient high speed operation.
33 commutation waveforms the mc1231a supports two commutation waveforms, a 120 degree offset waveform appropriate for 3-phase brushless motors, and a 90- degree offset waveform appropriate for 2-phase brushless motors. to specify the 3-phase brushless waveform the command set_phase_3 is used, and to set it for 2-phase brushless motors the command set_phase_2 is used. depending on the waveform selected, as well as the motor output mode selected (pwm or dac16), either 2 or 3 commutated output signals per axis will be provided by the chipset. the following chart shows this. waveform motor output mode # of output signals & name 3-phase pwm 3 (a, b, c) 3-phase dac16 2 (a, b) 2-phase pwm 2 (a, b) 2-phase dac16 2 (a, b) for specific pin assignments of the pwm and dac16 motor output signals see the section of this manual entitled 'pin descriptions'. the diagram below shows the phase a, b, and c commutation signals for a 3-phase brushless motor, and the phase a and phase b signals for a 2-phase brushless motor. phase a phase b phase c 90 180 270 360 120 deg phase a phase b 90 deg 3-phase brushless 2-phase brushless commutation parameters to perform sinusoidal commutation it is necessary to specify the # of encoder counts per electrical cycle. to determine this value the # of magnetic poles on the motor, along with the number of encoder counts per motor revolution must be known. knowing these two quantities the number of encoder counts per electrical cycle is given by the following equation: counts_per_cycle = 2*counts_per_rot/n_poles where: counts_per_rot is the # of enc. counts per motor rotation n_poles is the number of motor poles the command used to set the number of encoder counts per electrical cycle is set_phase_cnts. to read back this value use the command get_phase_cnts. the smallest allowed value for the number of counts per electrical cycle is 129 (decimal). index pulse referencing to enhance long term commutation reliability the mc1231a provides the ability to utilize an index pulse input from the motor encoder as a reference point during commutation. by using an index pulse during the phase calculations any long term loss of encoder counts which might otherwise affect the accuracy of the commutation are automatically eliminated. to utilize index pulse referencing the motor encoder chosen must provide an index pulse signal to the chipset once per rotation. this index pulse is connected to the chipset using the index signal of the i/o chip (see pin descriptions section for more information). index pulse referencing is recommended for all rotary brushless motors with quadrature encoders. for linear brushless motors it is generally not used, although it can be used as long as the index pulses are arranged so that each pulse occurs at the same phase angle within the commutation cycle. when using an index pulse the number of encoder counts per electrical cycle is not required to be an exact integer. in the case that this value is not an integer, the nearest integer should be chosen. conversely, if index pulses are not being used then the number of counts per electrical cycle must be an exact integer, with no remainder. for example if a 6-pole brushless motor is to be used with an encoder without an index pulse than an encoder with 1200 counts per rotation would be an appropriate choice, but an encoder with 1024 would not because 1024 can not be divided by 3 evenly. index pulse referencing is performed automatically by the chipset, regardless of the initialization scheme used (algorithmic, hall- based, microstepping, or direct set).
34 commutation error detection with an index signal properly installed the chipset will automatically correct any small losses of encoder counts that may occur. if the loss of encoder counts becomes excessive however, or if the index pulse does not arrive at the expected location within the commutation cycle, a "commutation error" is said to occur. commutation errors are caused by a number of circumstances. the most common are listed below: - noise on the a or b encoder lines - noise on the index line - incorrect setting of # encoder counts per electrical cycle for each instance that a commutation error occurs phase referencing will not occur for that index pulse. depending on the cause of the error the commutation error may be a one-time event, or may occur essentially continuously after the first event. when a commutation error occurs bit # 11 of the status word is set high (1). this condition can also be used as a source of host interrupts so the host can be automatically notified of a commutation error. to recover from a commutation error this bit is cleared by the host, however depending on the nature of the error it is possible that commutation errors will continue to be generated. a commutation error may indicate a serious problem with the motion system, potentially resulting in unsafe motion. it is the responsibility of the host to determine and correct the cause of commutation errors. phase initialization after startup the chipset must determine the proper commutation angle of the motor relative to the encoder position. this information is determined using a procedure called phase initialization. the chipset provides four methods to perform phase initialization; algorithmic, hall sensor-based, microstepping, and direct-set. algorithmic phase initialization to set the chipset for algorithmic initialization use the command set_phase_algor in the algorithmic initialization mode no additional motor sensors beyond the position encoder are required. to determine the phasing the chipset performs a sequence which briefly stimulates the motor windings, and sets the initial phasing using the observed motor response. from the resulting motion the chipset can automatically determine the correct motor phasing. depending on the size and speed of the motor, the time between the start of motor phasing and the motor coming to a complete rest (settling time) will vary. to accommodate these differences the amount of time to wait for the motor to settle is programmable using the command set_phase_time. to read back this value use the command get_phase_time. to minimize the impact on the system mechanics this method utilizes a motor command value set by the host processor to determine the overall amount of power to "inject" into the motor during phase initialization typically, the amount of power to inject should be in the range of 5 - 25 % of full scale output, but in any case should be at least 3 times the breakaway stiction torque. for best results the initialization motor command value can be determined experimentally. the command used to set the motor output level is set_buf_mtr_cmd. to read back this value use the command get_buf_mtr_cmd. to execute the initialization procedure, the host command init_phase is used. upon executing this command, the phasing procedure will immediately be executed. before the phase initialization command is given however (init_phase command), the motor must be turned off (mtr_off command), a motor command output must be specified (set_buf_mtr_cmd command), and an initialization duration must be specified (set_phase_time command). during algorithmic phase initialization the motor may move suddenly in either direction. proper safety precautions should be taken to prevent damage from this movement. in addition, to provide accurate results motor movement must be unobstructed in both directions and must not experience excessive stiction. hall-based phase initialization to set the chipset for hall-based initialization use the command set_phase_hall in this mode 3 hall-sensor signals are used to initially determine the motor phasing, and sinusoidal commutation begins automatically after the motor has moved through one full rotation. the hall-sensor signals are fed back to the chipset through the signals hall1a-c (axis #1) and hall2a-c (axis # 2). care should be taken to connect these sensors properly. to read the current status of the hall sensors use the command get_halls. the following diagram shows the relationship between the state of the three hall sensor inputs for each axis and the commutated motor outputs. this graph shows the expected hall sensor states and winding excitation for forward motion (increasing position).
35 phase a phase b phase c 90 180 270 360 3-phase brushless hall a hall b hall c unlike the algorithmic method, using hall-based phase initialization no special motor procedures are required. initialization is performed using the command init_phase, and occurs immediately, without any motor motion. to accommodate varying types of hall sensors, or sensors that contain inverter circuitry, the signal level/logic interpretation of the hall sensor input signals can be set through the host. the command set_hall_sense accepts a bit-programmed word which controls whether the incoming hall signals are interpreted as active high, or active low. to read back this hall interpretation value use the command get_hall_sense. for details on the programming of this control word see the command reference section of this manual. hall-based initialization should only be used with a 3-phase commutation waveform, and with hall sensors located 120 degrees apart. hall-sensors located 60 degrees apart should not be used. microstepping phase initialization if the location of the index pulse in relation to the motor rotor and case is known then it may be advantageous to use an initialization technique which operates the motor as a microstepper, rotating the motor until the index pulse is found, and then setting the phase angle explicitly. this scheme is only appropriate for motors which have the index pulse in a fixed and repeatable location within the commutation cycle for all of the motors to be used during manufacturing of the product. although this is relatively uncommon, it is typical for motors with optical hall- sensors which use a single disk containing the a, b, index, and hall sensor information. to set the chipset for microstepping operation the command set_phase_micro is used. to restore the chipset for encoder- based commutation the command set_phase_enc is used. once the index pulse is encountered the phase angle can be set using the command set_phase. to operate the motor in microstepping mode the motor must be set on (mtr_on command), and a motor output value must be provided (set_buf_mtr_cmd & update). in addition the # of encoder counts per electrical cycle should be set to 512. when in microstepping mode each trajectory 'count' corresponds to 1/256 of a full electrical cycle. for example using a 4-pole motor (2 electrical cycles per motor rotation) a trajectory move of 512 counts will move the motor 1 full motor rotation. special care should be taken when initializing the motor using the microstepping method. because the motor is operated 'open-loop' the resultant coil energization and subsequent rotation may be jerky and abrupt. phase initialization using the microstepping method should only be used under special circumstances. it is not generally recommended unless the algorithmic or hall-based methods can not be used. direct-set phase initialization if, after power-up the location of the motor phasing is known explicitly the phase angle can simply be set directly using the set_phase command. this typically occurs when sensors such as resolvers are used where the returned motor position information is absolute in nature (not incremental) , and can be used to generate a quadrature data stream as well as be read by the host directly. phase initialization programming the following examples show typical host command sequences to initialize the commutation of a brushless motor for all four initialization methods. algorithmic initialization sequence set_phase_cnts uuuu set # of encoder counts per electrical cycle set_phase_algor set phase initialization method to algorithmic mtr_off turn motor off so it doesn't conflict with initialization procedure set_phase_time wwww set algorithmic phase init duration set_buf_mtr_cmd xxxx set initialization motor command level init_phase perform the initialization this sequence will cause the motor to immediately begin the initialization procedure, which will last 'wwww' servo loops long. to determine if the procedure is completed, the command
36 get_phase_info can be used. the 'phase initialization not completed' bit will indicate when the procedure is finished. after the initialization procedure is completed the motor should be enabled (mtr_on cmd) if the chipset is to be run in closed loop mode. hall-based initialization sequence set_phase_cnts uuuu set # of encoder counts per electrical cycle set_hall_sense vvvv set hall sensor signal interpretation set_phase_hall set phase initialization method to hall-sensor based init_phase perform the initialization this sequence will cause the chipset to read the hall sensor signals and initialize the phasing immediately. the motor will not move as a result of this sequence, and no delay is required for further motor operations to be performed. microstepping initialization sequence set_phase_cnts 512 set # of encoder counts per electrical cycle to 512 (dec.) set_phase_micro set chipset for microstepping mode set_capt_index set capture mode to index (not necessary if already so set) clr_status clear axis status get_capt clear out any previous captures mtr_on turn motor on (not necessary if already on) set_buf_mtr_cmd xxxx set motor command value set_pos 560 set rotation distance a bit more than 1 full motor rotation (assuming 4-pole motor set_vel yyyy set velocity set_acc zzzz set acceleration update start the motion this sequence will cause the motor to make a move of somewhat more than 1 rotation. after the update the host should poll the status word (get_status cmd) until a capture occurs and then immediately send a set_phase command, followed by a set_phase_offset command, each loaded with the phase angle required to init. the phasing. see the following section of this manual entitled "adjusting the commutation angle" for more information on determining the correct phase set value. once the set_phase and set_phase_offset commands have been sent by the host the chipset should be initialized for normal commutation operation. this means the phasing mode should be set to encoder-based (set_phase_enc cmd.) and the correct # of encoder counts per electrical cycle should be set (set_phase_cnts cmd.) direct-set initialization sequence set_phase_cnts xxxx set # of encoder counts per electrical cycle (hex) set_phase xxxx set phase angle based on information from external sensor this sequence will directly set the phase angle to a value determined by another sensor. the set value must be between 0 and the # of encoder counts per electrical cycle. adjusting the commutation angle the mc1231a supports the ability to change the motor's commutation angle directly, both when the motor is stationary and when it is in motion. although this is not generally required it can be useful during testing, or during commutation initialization when the microstepping or direct-set methods are used. to change the commutation angle when the motor is stationary use the command set_phase. to change the commutation angle while the motor is moving the index pulse is required, and a different command, set_phase_offset, is used which only takes effect when an index pulse occurs. the following description provides some background on this function. after phase initialization has occurred the correct commutation angle is stored by the chipset as the offset from the index mark (in encoder counts) to the phase a maximum output value (commutation 'zero' location). this 16-bit offset register can be read using the command get_phase_offset. the following chart shows the relationship between the phase a commutation 'zero' location, the index location, and the phase offset value. for a given motor the index pulse shown in this figure could have been located anywhere within the phase cycle since it will usually vary in position from motor to motor. only motors that have been mechanically assembled such that the index position is referenced to the motor windings will have a consistent index position relative to the commutation zero location. 90 180 270 360 commutation 'zero' location index pulse phase offset phase a waveform before phase initialization has occurred the phase offset register will have a value of ffff (hex). once phase initialization has occurred and the motor has been rotated such that at least one index pulse has been
37 received, the phase offset value will be stored as a positive number with a value between 0 and the number of encoder counts per electrical cycle. to convert the phase offset value which is in encoder counts to degrees the following expression can be used: offset degrees = 360 * offset counts /counts_per_cycle where: offset degrees is the phase offset in degrees offset counts is the phase offset in encoder counts counts_per_cycle is the # of counts per electrical cycle set using the set_phase_cnts command the phase offset value can also be changed any number of times while the motor is in motion, although only relatively small changes should be made to avoid sudden jumps in the motor motion. the set_phase_offset and get_phase_offset commands can only be used when an index pulse from the encoder is connected. if no index pulse is used the phase offset angle can not be adjusted or read back by the host setting the phase offset value does not change the relative phasing of phase b and c to phase a these phases are still set at either 90 or 120 degree offsets from phase a (depending on the waveform chosen). encoder pre-scalar particularly when used with linear motors, the range in the value of the # of encoder counts per electrical cycle can vary widely. typical rotary motors can have a value between 129 and 32,767. linear brushless motors however can have values of 1,000,000 counts per cycle or higher because they often use high accuracy laser-based encoders. to accommodate this large range the mc1231a series chips support a prescalar function which, for the purposes of commutation calculations, divides the incoming encoder counts by 64. with the prescalar enabled the max range for the number of encoder counts per electrical cycle is 2,097,088. to enable the prescalar use the command set_prescale_on. to disable the prescalar use the command set_prescale_off. the prescalar function should not be enabled or disabled once the motor has been put in motion. the prescalar function only affects the commutation of the chipset. it does not affect the position used during servo filtering, or requested by the command get_actl_pos. velocity-based phase advance because of inductance and magnetic field setup delays a lag may exist between the motor command signals from the chipset and the desired magnetic field in the motor. this lag can reduce the efficiency and maximum velocity of the motor. to compensate for this effect the mc1231a chipsets provide the ability to advance the commutation phase of the motor during rotation so that the actual magnetic field experienced by the motor more closely resembles the optimum values. the phase advance value is determined by a combination of the motor velocity, and a phase advance gain value specified by the host. the phase advance value is calculated as follows: phase_advance = motor_velocity * kphase/1000 where: phase_advance is in units of encoder counts motor_velocity is in units of encoder counts/sample time kphase is the host-specified gain phase advance gain phase info status word a status word is available that indicates the current value of various phasing-related conditions. the phase information status word is a 16-bit register which can be queried using the command get_phase_info. it contains the following information (bit encoding is 0 = lsb, 15 = msb): bit # description 0 phase initialization mode. this bit will be set to 1 if the initialization mode is hall-based, 0 if the initialization mode is algorithmic. 1 used internally by chipset (may be 0 or 1) 2 commutation mode. this bit indicates whether the commutation mode has been set to microstepping (set_phase_micro cmd) or encoder-based (set_phase_enc cmd). a 1 indicates microstepping mode. 3 waveform. this bit indicates whether the output waveform is 3-phase (0) or 2-phase (1) 4-6 used internally by chipset (may be 0 or 1) 7 prescalar status. this bit indicates whether the prescalar is active. a 1 indicates it is active. 8 phase initialization not completed. this bit indicates that phase initialization has not been completed yet. a 1 indicates that initialization has not been completed. 9 used internally by chipset may be 0 or 1) 10-15 unused (set to 0)
38 commutation command summary: the following table summarizes the commands that are used in conjunction with sinusoidal commutation: command function set_phase_3 sets the commutation waveform for 3- phase brushless motors. set_phase_2 sets the commutation waveform for 2- phase brushless motors. set_phase_hall sets the phase initialization mode to hall-sensor-based set_phase_algor sets the phase initialization mode to algorithmic. set_phase_enc sets commutation mode to encoder- based set_phase_micro sets commutation mode to microstepping prescale_on sets the encoder prescalar on prescale_off sets the encoder prescalar off set_phase_cnts sets the # of encoder counts per commutation electrical cycle. set_phase_time sets the amount of time to wait during phase initialization set_phase sets the current phase angle set_phase_offset sets the phase offset angle set_kphase sets the velocity phase advance gain set_hall_sense sets the logic level interpretation for the hall sensor inputs init_phase begins the algorithmic phase initialization procedure. get_phase_info returns various commutation-related state information set by the host get_phase_cnts returns the number of encoder counts per electrical cycle get_phase_time returns the wait time used during phase initialization get_phase_offset returns the phase offset angle get_kphase returns the phase advance gain get_hall_sense returns the logic level interpretation for the hall sensor inputs get_halls returns the status of the hall sensors get_phase returns the current commutation angle. motor output configuration the mc1231a series of chipsets supports two motor output methods, pwm and dac (up to 16 bit resolution). below is shown a typical amplifier configuration for a 3-phase brushless motor using the pwm output mode: axis #1 phase a axis #1 phase b axis #1 phase c mc1231 mtr #1 mtr #2 axis #2 phase a axis #2 phase b axis #2 phase c amplifiers brushless motor (pwm mode) connection scheme in this configuration the chipset outputs 3 phased pwm magnitude signals per axis. these signals are then fed directly into 3 half-bridge type voltage amplifiers. below is shown a typical amplifier configuration for a 3-phase brushless motor using the dac output mode: axis #1 phase a axis #1 phase b axis #1 phase c mc1231 mtr #1 mtr #2 axis #1 c=-(a+b) axis #2 c=-(a+b) axis #2 phase a axis #2 phase b axis #2 phase c amplifiers brushless motor (dac mode) connection scheme dac 1a dac 1b dac 2a dac 2b when using dac output mode the digital word provided by the chipset must first be converted into a voltage using an external dac. two dac channels are required per axis. to construct the third phase for a brushless motor (c phase) the sum of the a and b signals must be 'negated' using c = -(a+b). this is usually accomplished with an op-amp circuit. in addition, if current loop control is desired the three output signals are usually arranged so that the sum of the currents flowing through the windings of the motor are zero. motor output signal interpretation the following graph shows the desired output voltage waveform for a single phase. 0 + motor comman d - motor command
39 the waveform is centered around a value of 0 volts. the magnitude of the generated waveform is proportional to either the output of the servo filter or the motor command register (depending on the commutation mode and motor on/off status). for example if the chipset is connected to a dac with output range of - 10 volts to + 10 volts and the chipset is set to open loop mode with a motor command value of 32,767 (which is the maximum allowed value) than as the motor rotates through a full electrical cycle, a sinusoidal waveform centered at 0 volts will be output with a minimum voltage of - 10, and a maximum voltage of +10. dac16 decoding the digital values output by the chipset to the dac encode the desired voltages as a 16-bit digital word. the minimum voltage is output as a digital word value of 0, a voltage of 0 volts is output as a digital word of 32,768 (dec.), and the maximum positive voltage is output as a digital word value of 65,535. to load each of the four (mc1231a) or two (mc1131a) dacs, the dac control pins in combination with the chipset's 16-bit data bus are used. to load a particular dac, the dac address (1 of 4) is output on the signals dac16addr0-1, the 16 bits of dac data are output on pins data0-11 (high 12 bits), as well as daclow0-3 (low 4 bits), i/oaddr0-3 and dacslct are high, and i/owrite is low. for more information on the dac signal timing & conditions, see the pin descriptions and timing diagrams section of this manual. dacs with lower resolution than 16 bits can also be used. to connect to a dac with less resolution, the high order bits of the 16-bit data word should be used. for example, to connect to an 8-bit dac, bits data4- data11 should be used. the low order 8 bits are written to by the chipset, but ignored by the dac circuitry. pwm decoding the pwm output mode also outputs a sinusoidal desired voltage waveform for each phase, however the method by which these signals encode the voltage differ substantially from the dac16 digital word. the pwm output mode uses a single signal per output motor phase. this signal contains a pulse-width encoded representation of the desired voltage. in this encoding the duty cycle of the waveform determines the desired voltage. the pwm cycle has a frequency of 24.5 khz, with a resolution of 10 bits, or 1/1,024. the following chart shows the encoding. 1 0 0/1024 (max. neg. value) 1024/1024 (max. pos. value) 512/1024 (0 value) 1 0 1 0 an output pulse width of 0 parts per 1,024 represents the maximum negative voltage, an output pulse width of 512 per 1,024 (50 %) represents a voltage of 0, and a pulse width of 1,024 per 1,024 represents the maximum positive voltage. this pwm scheme has been chosen to allow convenient interfacing to half bridge type amplifiers by connecting the pwm output to a level shifter circuit , and using this output to drive the high and low side drivers of the bridge.
40 command summary command mnemonic code (hex) available on axes acted on double buffered # data words /direction description axis control set_1 01 all axes set by cmd. - 1/read set current axis # to 1 set_2 02 all axes set by cmd. - 1/read set current axis # to 2 set_i 08 all axes interrupting axis - 1/read set current axis # to the interrupting axis profile generation set_prfl_s_crv 0b all axes current axis no 0 set profile mode to s-curve set_prfl_trap 09 all axes current axis no 0 set profile mode to trapezoidal point to point set_prfl_vel 0a all axes current axis no 0 set profile mode to velocity-contouring set_prfl_gear 0c 1 current axis no 0 set profile mode to electronic gear set_pos 10 all axes current axis yes 2/write set command position set_vel 11 all axes current axis yes 2/write set command velocity set_acc 12 all axes current axis yes 2/write set command acceleration set_max_acc 15 all axes current axis yes 1/write set max acceleration (s-curve profile only) set_jerk 13 all axes current axis yes 2/write set command jerk set_ratio 14 1 current axis yes 2/write set command electronic gear ratio stop/clr_prfl 46 all axes current axis yes 0 abruptly stop current axis trajectory motion smooth_stop 4e all axes current axis yes 0 smoothly stop current axis trajectory motion synch_prfl 47 all axes current axis yes 0 set target position equal to actual position get_pos 4a all axes current axis - 2/read get command position get_vel 4b all axes current axis - 2/read get command velocity get_acc 4c all axes current axis - 2/read get command acceleration get_max_acc 4f all axes current axis - 1/read get max. acceleration (s-curve profile only) get_jerk 58 all axes current axis - 2/read get command jerk get_ratio 59 1 current axis - 2/read get command electronic gear rate get_trgt_pos 1d all axes current axis - 2/read get current target position get_trgt_vel 1e all axes current axis - 2/read get current target velocity digital filter set_kp 25 all axes current axis yes 1/write set proportional gain set_kd 27 all axes current axis yes 1/write set derivative gain set_ki 26 all axes current axis yes 1/write set integral gain set_kvff 2b all axes current axis yes 1/write set feedforward gain set_i_lm 28 all axes current axis yes 1/write set integration limit set_mtr_lmt 06 all axes current axis no 1/write set motor output limit set_mtr_bias 0f all axes current axis no 1/write set motor output bias set_pos_err 29 all axes current axis no 1/write set maximum position error limit get_kp 50 all axes current axis - 1/read get proportional gain get_kd 52 all axes current axis - 1/read get derivative gain get_ki 51 all axes current axis - 1/read get integral gain get_kvff 54 all axes current axis - 1/read get velocity feedforward gain get_i_lm 53 all axes current axis - 1/read get integration limit get_mtr_lmt 07 all axes current axis - 1/read get motor output limit get_mtr_bias 2d all axes current axis - 1/read get motor output bias get_pos_err 55 all axes current axis - 1/read get position error get_intgr 2e all axes current axis - 1/read get integrated position error value get_actl_pos_err 60 all axes current axis - 1/read get actual position error set_auto_stop_on 45 all axes current axis - 0 set auto stop on motion error mode on set_auto_stop_off 44 all axes current axis - 0 set auto stop on motion error mode off parameter update set_time_brk 17 all axes current axis no 0 set breakpoint mode to time set_pos_brk 18 all axes current axis no 0 set breakpoint mode to pos. target position set_neg_brk 19 all axes current axis no 0 set breakpoint mode to neg. target position set_actl_pos_brk 1b all axes current axis no 0 set breakpoint mode to pos. actual position set_actl_neg_brk 1c all axes current axis no 0 set breakpoint mode to neg. actual position set_mtn_cmplt_brk 35 all axes current axis no 0 set breakpoint mode to motion complete set_ext_brk 5e all axes current axis no 0 set breakpoint mode to external set_brk_off 6d all axes current axis no 0 set breakpoint mode off set_brk_pnt 16 all axes current axis no 2/write set breakpoint comparison value update 1a all axes current axis no 0 immediate parameter update multi_update 5b all axes set by mask no 1/write multiple axis immediate parameter update set_auto_update_on 5c all axes current axis no 0 set automatic profile update on set_auto_update_off 5d all axes current axis no 0 set automatic profile update off get_brk_pnt 57 all axes current axis - 2/read get breakpoint comparison value
41 command mnemonic code ( hex) available on axis acted on double buffered # data words /direction description interrupt processing set_intrpt_mask 2f all axes current axis no 1/write set interrupt mask get_intrpt 30 all axes interrupting axis - 1/read get status of interrupting axis rst_intrpt 32 all axes interrupting axis no 1/write reset interrupting events get_intrpt_mask 56 all axes current axis - 1/read get interrupt mask status/mode clr_status 33 all axes current axis no 0 reset status of current axis rst_status 34 all axes current axis no 1/write reset events for current axis get_status 31 all axes current axis - 1/read get axis status word get_mode 48 all axes current axis - 1/read get axis mode word encoder set_capt_index 64 all axes current axis no 0 set index signal as position capture trigger set_capt_home 65 all axes current axis no 0 set home signal as position capture trigger get_capt 36 all axes current axis - 2/read get current axis position capture location motor set_output_pwm 3c all axes global no 0 set motor output mode to pwm set_output_dac16 3b all axes global no 0 set motor output mode to 16-bit dac mtr_on 43 all axes current axis no 0 enable motor output mtr_off 42 all axes current axis no 0 disable motor output set_mtr_cmd 62 all axes current axis no 1/write write direct value to motor output get_mtr_cmd 3a all axes current axis - 1/read read motor output command set_buf_mtr_cmd 77 all axes current axis yes 1/write write double buffered motor command output get_output_mode 6e all axes global - 1/read get current output mode get_buf_mtr_cmd 69 all axes current axis - 1/read get double buffered motor command value miscellaneous axis_on 41 all axes current axis no 0 enable axis axis_off 40 all axes current axis no 0 disable axis set_actl_pos 4d all axes current axis no 2/write set current actual axis location get_actl_pos 37 all axes current axis - 2/read get current actual axis location set_lmt_sense 66 all axes global no 1/write set limit switch bit sense get_lmt_swtch 67 all axes global - 1/read get state of limit switches lmts_on 70 all axes global no 0 set limit switch sensing on lmts_off 71 all axes global no 0 set limit switch sensing off get_home 05 all axes global - 1/read get state of home switches set_smpl_time 38 all axes global no 1/write set servo loop sample time get_smpl_time 61 all axes global - 1/read get servo loop sample time reset 39 all axes gl obal no 0 reset chipset get_vrsn 6c all axes global - 1/read get chipset software version information get_time 3e all axes global - 2/read get current chip set time (# servo loops) commutation set_phase_3 73 all axes current axis no 0 set waveform to 3- phase set_phase_2 74 all axes current axis no 0 set waveform to 2- phase set_phase_hall 78 all axes current axis no 0 set phase initialization to hall-based set_phase_algor 79 all axes current axis no 0 set phase initialization to algorithmic set_phase_enc 5f all axes current axis no 0 set commutation m ode to encoder-based set_phase_micro 63 all axes current axis no 0 set commutation m ode to microstepping prescale_on 0d all axes current axis no 0 set encoder prescale on prescale_off 0e all axes current axis no 0 set encoder prescale off set_phase_cnts 75 all axes current axis no 1/write set # of encdr c ounts per commutation cycle set_phase_time 72 all axes current axis no 1/write set am ount of time to wait after phase init. set_phase_offset 76 all axes current axis no 1/write set phase offset value set_kphase 1f all axes current axis no 1/write set velocity phase advance gain set_hall_sense 23 all axes global no 1/write set hall-sensor logic level interpretation set_phase 84 all axes current axis no 1/write set current commutation phase angle init_phase 7a all axes current axis no 0 perform phase initialization procedure get_phase_info 7f all axes current axis - 1/read get commutation flags set by host get_phase_cnts 7d all axes current xais - 1/read get # of encdr c ounts per commutation cycle get_phase_time 7c all axes current axis - 1/read get am ount of time to wait after phase init get_phase_offset 7b all axes current axis - 1/read get phase offset value get_kphase 20 all axes current axis - 1/read get velocity phase advance gain get_hall_sense 24 all axes global - 1/read get hall-sensor logic level interpretation get_halls 7e all axes global - 1/read get state of hall sensors get_phase 2c all axes current axis - 1/read get current commutation phase angle
42 command reference each command consists of a single byte, with a command code value as described in the "encoding" description for each command. data is transmitted to/from the chip set in 16-bit words. all data is encoded "high to low" i.e. each 16-bit word is encoded high byte first, low byte second, and two word data values are encoded high word first, low word second. signed data is represented in two?s complement format. in the case of 32-bit quantities, the entire 32-bit number is two's complemented. for example to transmit the decimal number 1,234,567, which has a hexadecimal representation of 12d687, the high word is sent first (12 hex) and then the low word is sent (d687 hex). negative numbers are treated in the same way. for example to transmit the decimal number -746,455 , which has a hexadecimal value of fff49c29, then the high word is transmitted first (fff4 hex.) followed by the low word (9c29 hex.). some chipset quantities such as position are provided with ?unity scaling?, meaning that the value provided is used by the chipset without internal scaling. other chipset quantities are scaled by various constants to allow a more useful operating range. the non-unity scaling constants that are used by the chipset are either 1/2 16 or 1/2 32 . if 1/2 16 scaling is used then the chipset expects a number which has been scaled by a factor of 65,536 from the ?user? units. for example to specify a velocity (set_vel command) of 2.75 counts/sample time, 2.75 is multiplied by 65,536 and the result is sent to the chipset as a 32 bit integer (180,224 dec. or 2c000 hex.). 1/2 16 scaling is used with 16 bit as well as 32 bit quantities. the size of the data word does not affect how the scaling is performed. if 1/2 32 scaling is indicated the chipset expects a number which has been scaled by a factor of 4,294,967,296. for example to specify a jerk value (set_jerk command) of .0075 counts/sample time 3 , .0075 is multiplied by 4,294,967,296 and the result is sent to the chipset as a 32 bit integer (32,212,256 dec. or 1eb8520 hex). all transmissions to/from the chip set are checksummed. the checksum is a 16-bit quantity that can be read at the end of each command transmission. the checksum value consists of the 16-bit sum of all 16-bit transmissions to or from the chip set, including the command byte which occupies the low byte of the first 16-bit transmission word. for example if a set_vel command (which takes two 16-bit words of data) was sent with a data value of fedcba98 (hex), the checksum would be: 0011 (code for set_vel command) + fedc (high data word) + ba98 (low data word) ---------- 1b985 check sum = b985 (keep bottom 16 bits only) the following hex code commands are reserved for future use, or are currently used during manufacturing/test. they return a valid checksum, although they should not be used during normal chipset operations. the hex command codes are: 49, 4e the following hex code commands are illegal, and will return a checksum of 0. they should not be used during normal chipset operations. the hex command codes are: 00, 03, 04, 22, 3d, 80, 81, 82, 83, 85 through ff unless otherwise noted, all numerical values presented in this command summary are in decimal. axis control set_1 set current axis to #1 data/direction: 1/read encoding: 01 (hex) axis acted on: set by command available on: all axes double buffered: no set_1 changes the current axis number to 1. all commands that operate on the current axis will be affected by this command. the status of axis #1 is returned. see get_status command for the status word format. set_2 set current axis to #2 data/direction: 1/read encoding: 02 (hex) axis acted on: set by command available on: all axes double buffered: no set_2 changes the current axis number to 2. all commands that operate on the current axis will be affected by this command. the status of the axis #2 is returned. see get_status command for the status word format. set_i set current axis to interrupting axis data/direction: 1/read encoding: 08 (hex) axis acted on: interrupting axis available on: all axes double buffered: no set_i changes the current axis number to the interrupting axis, which is the axis that has caused the host interrupt to become active. all commands that operate on the current axis will be affected by this command. the status of the interrupting axis is returned. see get_status command for the status word format.
43 profile generation set_prfl_s_crv set profile mode to s-curve point to point data/direction: none encoding: 0b (hex) axis acted on: current axis available on: all axes double buffered: no set_prfl_s_crv sets the trajectory profile mode to s-curve point to point. in this mode, the host specifies the destination position (set_pos cmd), the maximum velocity (set_vel cmd) the maximum acceleration (set_max_acc cmd), and the jerk (set_jerk cmd). once in this mode, the trajectory profile generator will drive the axis to the destination position at the specified jerk while not exceeding the maximum velocity and max. acceleration. the axis will stay in this profile mode until another profile mode is explicitly set. while in this profile mode, no parameters should be changed while the axis is in motion. before setting the current profile mode to s-curve point to point, the axis should be completely at rest. set_prfl_trap set profile mode to trapezoidal point to point data/direction: none encoding: 09 (hex) axis acted on: current axis available on: all axes double buffered: no set_prfl_trap sets the trajectory profile mode to trapezoidal point to point. in this mode, the host specifies the destination position (set_pos cmd), the maximum velocity (set_vel cmd) and the acceleration (set_acc cmd). once in this mode, the trajectory profile generator will drive the axis to the destination position at the specified acceleration while not exceeding the maximum velocity. position and velocity may be changed on the fly when in this profile mode; acceleration may not. the axis will stay in this profile mode until another profile mode is explicitly set. before setting the current profile mode to trapezoidal point to point, the axis should be completely at rest. while in this mode, the acceleration should not be changed until the axis has come to a stop. set_prfl_vel set profile mode to velocity contouring. data/direction: none encoding: 0a (hex) axis acted on: current axis available on: all axes double buffered: no set_prfl_vel sets the trajectory profile mode to velocity contouring. in this mode the host specifies the command acceleration (set_acc cmd), and the maximum velocity (set_vel cmd). once in this mode, the trajectory profile generator will drive the axis at the specified acceleration while not exceeding the maximum velocity. the acceleration and the maximum velocity may be changed on the fly. the axis will stay in this profile mode until another profile mode is explicitly set. there are no limitations on changing the profile mode to velocity contouring while the axis is in motion. there are no host-specified limits on the position in this mode. it is the responsibility of the host to specify profile parameters that maintain the axis within safe position limits. set_prfl_gear set profile mode to electronic gear data/direction: none encoding: 0c (hex) axis acted on: current axis available on: axis #1, #2 (see chart) double buffered: no set_prfl_gear, sets the trajectory profile mode to electronic gear. in this mode the host specifies the gear ratio (set_ratio cmd). once in this mode the trajectory profile generator will drive the current (slave) axis to the position specified by the master axis factored by the specified gear ratio. the gear ratio may be changed on the fly. the axis will stay in this profile mode until another profile mode is explicitly set. the electronic gear mode is available on the following axis for each chipset: chipset p/n gear pairs (master -> slave) mc1231a #2 -> #1 mc1131a not available there are no host-specified limits to axis motion in this mode. it is the responsibility of the host to specify a gear ratio that maintains the axis within safe motion limits. set_pos set command position data/direction 2/write encoding: 10 (hex) axis acted on: current axis available on: all axes double buffered: yes set_pos sets the final position used during the s-curve and trapezoidal trajectory profile generator modes. the position is specified as a signed 32-bit number with units of counts. the range is
44 -1,073,741,824 to 1,073,741,823. the loaded position is not utilized until a parameter update occurs. set_vel set command velocity data/direction: 2/write encoding: 11 (hex) axis acted on: current axis available on: all axes double buffered: yes set_vel sets the maximum velocity magnitude used during the s- curve, trapezoidal, and velocity contouring profile modes. the velocity is specified as an unsigned 32-bit number with units of counts/sample. the data word scaling is 1/2 16 . the range is 0 to +1,073,741,823. the loaded velocity is not utilized until a parameter update occurs. set_acc set command acceleration data/direction: 2/write encoding: 12 (hex) axis acted on: current axis available on: all axes double buffered: yes set_acc sets the command acceleration. when in trapezoidal point- to-point mode, the acceleration is specified as an unsigned 32-bit number with units of counts/sample 2 , represented using 1/2 16 scaling. the range is 0 to +1,073,741,823. when in the velocity contouring mode, the acceleration is specified as a signed 32-bit number with units of counts/sample 2 , represented in 1/2 16 format.the range is - 1,073,741,824 to +1,073,741,823. the loaded acceleration is not utilized until a parameter update occurs. this command is used when the profile mode is set to trapezoidal point-to-point or velocity contouring. set_max_acc set maximum acceleration data/direction: 1/write encoding: 15 (hex) axis acted on: current axis available on: all axes double buffered: yes set_max_acc sets the maximum acceleration. the acceleration is specified as an unsigned 16-bit number with units of counts/sample 2 represented using 1/2 16 scaling. the range is 0 to +1,073,741,823. the loaded max. acceleration is not utilized until a parameter update occurs. this command is used when the profile mode is set to s-curve point to point. set_jerk set command jerk data written: 2 words data read: none encoding: 13 (hex) axis acted on: current axis available on: all axes double buffered: yes set_jerk sets the command jerk used during the s-curve profile generation mode. the jerk is specified as an unsigned 32-bit number with units of counts/sample 3 . the scaling is 1/2 32 . the range is 0 to 2,147,483,647. the loaded jerk is not utilized until a parameter update occurs. set_ratio set command gear ratio data/direction: 2/write encoding: 14 (hex) axis acted on: current axis available on: axis #1, #2 double buffered: yes set_ratio sets the electronic gear ratio used by the trajectory profile generator. it is used when the profile mode is set to electronic gear. the gear ratio is specified as a signed 32-bit number represented using 1/2 16 scaling. the range is -1,073,741,824 to +1,073,741,823. the specified ratio value is defined as the number of counts of the slave axis per master axis count with a positive number indicating motion in the same direction. for example a value of +8000 hex (1/2) will result in 1/2 turn in the positive direction of the slave axis for each full turn of the master axis in the positive direction, and a value of -fffe0000 hex (-2) will result in 2 turns in the negative direction of the slave axis for each full turn of the master axis in the positive direction. the loaded ratio is not utilized until a parameter update occurs. stop/clr_prfl abruptly stop current axis motion data/direction: none encoding: 46 (hex) axis acted on: current axis available on: all axes double buffered: yes stop, also known as clr_prfl in earlier chipset versions, stops the current axis by setting the target velocity to zero. this function will not be performed until a parameter update occurs. after the update occurs the axis trajectory generator will stop and the motion complete bit will be set. this command is useful for stopping the axis abruptly.
45 smooth_stop smoothly stop current axis motion data/direction: none encoding: 4e (hex) axis acted on: current axis available on: all axes double buffered: yes smooth_stop stops the current axis by setting the desired velocity to zero, resulting in a controlled deceleration of the axis eventually to a velocity of 0. the deceleration profile will mirror the acceleration profile for the current profile mode. for example if the smooth_stop command is given during an s-curve profile the deceleration profile may have up to three phases, depending on the # of phases during the acceleration profile, and if the smooth_stop command is given during a trapezoidal profile or a velocity mode profile the deceleration will be linear, with a value equal to the acceleration parameter. this command does not function when the profile mode is set to electronic gear. synch_prfl set target position equal to the actual position data/direction: none encoding: 47 (hex) axis acted on: current axis available on: all axes double buffered: yes synch_prfl sets the trajectory profile generator target position equal to the actual axis position, clearing the following error. this command is available for all profile types. this function will not be performed until a parameter update occurs. the synch_prfl command does not set the target velocity to zero. if it is desired that the axis not move after a synch_prfl command then a stop command, in addition to the synch_prfl command should be used. get_pos get command position data/direction: 2/read encoding: 4a (hex) axis acted on: current axis available on: all axes double buffered: - get_pos returns the destination position set using the set_pos command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. the returned position is a signed 32-bit number with units of counts. get_vel get command velocity data/direction: 2/read encoding: 4b (hex) axis acted on: current axis available on: all axes double buffered: - get_vel returns the maximum velocity set using the set_vel command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. the returned velocity is an unsigned 32-bit number in 1/2 16 format with units of counts/sample. get_acc get command acceleration data/direction: 2/read encoding: 4c (hex) axis acted on: current axis available on: all axes double buffered: - get_acc returns the acceleration value set using the set_acc command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. the returned position is either an unsigned 32-bit number in 1/2 16 format with units of counts/sample 2 , or a signed 32 bit number in 1/2 16 format with units of counts/sample 2 . this command is used when the profile mode is set to trapezoidal point-to-point or velocity contouring. get_max_acc get maximum acceleration data/direction: 1/read encoding: 4f (hex) axis acted on: current axis available on: all axes double buffered: - get_max_acc returns the max. acceleration value set using the set_max_acc command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. the returned value is an unsigned 16-bit number in 1/2 16 format with units of counts/sample 2 . this command is used when the profile mode is set to s-curve point to point.
46 get_jerk get command jerk data/direction: 2/read encoding: 58 (hex) axis acted on: current axis available on: all axes double buffered: - get_jerk returns the jerk value set using the set_jerk command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. the returned jerk is an unsigned 32-bit number with 1/2 32 scaling with units of counts/sample 3 . get_ratio get command gear ratio data/direction: 2/read encoding: 59 (hex) axis acted on: current axis available on: all axes double buffered: - get_ratio returns the gear ratio set using the set_ratio command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. the returned ratio is a signed 32-bit number in 1/2 16 format. get_trgt_pos return target position data/direction: 2/read encoding: 1d (hex) axis acted on: current axis available on: all axes double buffered: - get_trgt_pos returns the current desired position value being generated by the trajectory profile generator. this value represents the target position for the axis at the current sample time, i.e. the position being output by the trajectory profile generator at the time of the command. this command operates for all profile modes. the value returned is a 32-bit signed number with units of counts. the range is - 1,073,741,824 to 1,073,741,823. this command is useful to monitor the profile being generated by the chip set, or to verify servo performance. get_trgt_vel return target velocity data/direction: 2/read encoding: 1e (hex) axis acted on: current axis available on: all axes double buffered: - get_trgt_vel returns the current desired velocity value being generated by the trajectory profile generator. this value represents the target velocity for the axis at the current sample time, i.e. the velocity being output by the trajectory profile generator at the time of the command. this command operates for all profile modes. the value returned is a 32 bit signed number with units of counts/sample, represented in 1/2 16 format. the range is -1,073,741,824 to +1,073,741,823. this command is useful to monitor the profile being generated by the chip set, or to verify servo performance. digital filter set_kp set proportional gain data/direction: 1/write encoding: 25 (hex) axis acted on: current axis available on: all axes double buffered: yes set_kp sets the proportional gain for the digital filter. the gain is specified as an unsigned 16-bit number. the range is 0 to 32,767. the loaded gain is not utilized until a parameter update occurs. set_kd set derivative gain data/direction: 1/write encoding: 27 (hex) axis acted on: current axis available on: all axes double buffered: yes set_kd sets the derivative gain for the digital filter. the gain is specified as an unsigned 16-bit number. the range is 0 to 32,767. the loaded gain is not utilized until a parameter update occurs. set_ki set integral gain data/direction: 1/write encoding: 26 (hex) axis acted on: current axis available on: all axes double buffered: yes set_ki sets the integral gain for the digital filter. the gain is specified as an unsigned 16-bit number. the range is 0 to 32,767. the loaded gain is not utilized until a parameter update occurs. set_kvff set velocity feed forward gain data/direction: 1/write encoding: 2b (hex) axis acted on: current axis available on: all axes double buffered: yes set_kvff sets the velocity feed forward gain for the digital filter. the gain is specified as an unsigned 16 bit number. the range is 0 to 32,767. the loaded gain is not utilized until a parameter update occurs.
47 set_i_lm set integration limit data/direction: 1/write encoding: 28 (hex) axis acted on: current axis available on: all axes double buffered: yes set_i_lm sets the integration limit for the digital filter. the integration limit is specified as an unsigned 16-bit number. the range is 0 to 32,767. the loaded integration limit is not utilized until a parameter update occurs. set_mtr_lmt set motor output limit data/direction: 1/write encoding: 06 (hex) axis acted on: current axis available on: all axes double buffered: no set_mtr_lmt sets the maximum allowed motor command value output by the servo filter. the motor limit is specified as an unsigned 16-bit number with a range of 0 to 32,767. if the magnitude of the filter output value (whether positive or negative) exceeds the motor limit than the output value is maintained at the motor limit value. once the filter output value returns below the specified limit than normal servo filter values are output. the loaded motor output limit is utilized immediately. no update command is required. the set_mtr_lmt command only functions during closed loop operations. set_mtr_bias set motor output bias data/direction: 1/write encoding: 0f (hex) axis acted on: current axis available on: all axes double buffered: no set_mtr_bias sets the filter dc bias value, used to offset constant uni-directional forces (typically a vertical axis which is not balanced by a counter-weight). the specified motor bias value is added directly to the output of the servo filter. the motor bias is specified as a signed 16-bit number with a range of -32,767 to 32,767. the loaded motor bias value is utilized immediately. no update command is required. the set_mtr_bias command functions during closed loop operations, as well as after a transition to open loop before a set_mtr_cmd manual motor output command has been given. caution should be used when selecting a motor bias value to avoid uncontrolled axis motion when transitioning to open loop mode. set_pos_err set position error limit data/direction: 1/write encoding: 29 (hex) axis acted on: current axis available on: all axes double buffered: no set_pos_err sets the position error limit for the digital filter. the error is specified as an unsigned 16-bit number. the range is 0 to 32,767. at each servo loop the magnitude of the position error calculated by the digital filter is compared with the specified position error limit. if the actual position error exceeds the specified value, the motion error interrupt bit is set. in addition, if the axis has been set for automatic motor stop upon motion error, the axis motor output may be turned off (all power to motor is turned off). the loaded maximum position error is utilized immediately. the value set by this command specifies the limit of the valid motion error range, but not necessarily the maximum error value. if the position error limit value is set to less than 32,767 than the actual position error may exceed the specified limit. get_kp get proportional gain data/direction: 1/read encoding: 50 (hex) axis acted on: current axis available on: all axes double buffered: - get_kp returns the proportional gain set using the set_kp command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. the returned gain value is an unsigned 16-bit number. get_kd get derivative gain data/direction: 1/read encoding: 52 (hex) axis acted on: current axis available on: all axes double buffered: - get_kd returns the derivative gain set using the set_kd command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. the returned gain value is an unsigned 16-bit number.
48 get_ki get integral gain data/direction: 1/read encoding: 51 (hex) axis acted on: current axis available on: all axes double buffered: - get_ki returns the integral gain set using the set_ki command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. the returned gain value is an unsigned 16-bit number. get_kvff get velocity feedforward gain data/direction: 1/read encoding: 54 (hex) axis acted on: current axis available on: all axes double buffered: - get_kvff returns the proportional gain set using the set_kvff command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. the returned gain value is an unsigned 16-bit number. get_i_lm get integration limit data/direction: 1/read encoding: 53 (hex) axis acted on: current axis available on: all axes double buffered: - get_i_lm returns the integration limit value set using the set_i_lm command. it returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. the returned integration limit value is an unsigned 16-bit number. get_mtr_lmt get motor output limit data/direction: 1/read encoding: 07 (hex) axis acted on: current axis available on: all axes double buffered: - get_mtr_lmt returns the maximum allowed motor command value output by the servo filter set using the set_mtr_lmt command. the returned value is an unsigned 16-bit number with a range of 0 to 32,767. get_mtr_bias get motor output bias data/direction: 1/read encoding: 2d (hex) axis acted on: current axis available on: all axes double buffered: - get_mtr_bias returns the filter dc bias value set using the set_mtr_bias command. the returned value is a signed 16-bit number with a range of -32767 to 32,767. get_pos_err get maximum position error data/direction: 1/read encoding: 55 (hex) axis acted on: current axis available on: all axes double buffered: - get_pos_err returns the maximum position error value set using the set_pos_err command. the returned maximum position error value is an un signed 16-bit number. get_intgr return current integrated position error value data/direction: 1/read encoding: 2e (hex) axis acted on: current axis available on: all axes double buffered: - get_intgr returns the current integrated position error value maintained by the digital filter. the value returned represents the top 16 bit word of the 24-bit integration value. the value returned is a 16-bit signed number. the range is -32,768 to +32,767. this command is useful to monitor the loading on the axis, since increases or decreases in the axis load may be reflected in the value of the integration limit. get_actl_pos_err return current position error data/direction: 1/read encoding: 60 (hex) axis acted on: current axis available on: all axes double buffered: - get_actl_pos_err returns the current instantaneous position error of the axis. the returned value represents the difference between the target position and the actual position (actual position minus target position), and is a signed 16-bit number. the range is -32,768 to +32,767. this command is useful to monitor and analyze the tracking error of the axis.
49 set_auto_stop_on enable automatic motor shutdown data/direction: none encoding: 45 (hex) axis acted on: current axis available on: all axes double buffered: no set_auto_stop_on enables automatic motor shutdown upon motion error. in this mode the motor will be disabled (equivalent to mtr_off cmd) when a motion error occurs (see set_pos_err cmd). the motor output can be re-enabled using the mtr_on cmd. set_auto_stop_off disables automatic motor shutdown data/direction: none encoding: 44 (hex) axis acted on: current axis available on: all axes double buffered: no set_auto_stop_off disables the automatic motor shutdown upon motion error mode. in this mode the motor will not be disabled when a motion error occurs. parameter update set_time_brk set break point mode to time based data/direction: none encoding: 17 (hex) axis acted on: current axis available on: all axes double buffered: no set_time_brk sets the current breakpoint mode to time based. in this mode the value loaded into the breakpoint register (set_brk_pnt cmd) will represent the number of sample loops since chip set power on. after the set_time_brk command is executed, at each servo loop the break point value will be compared against the current chip set time. if the values are equal all profile and filter parameters will be loaded in to the active registers. see get_time cmd for information on the chip set time. after this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. set_pos_brk set break point mode to positive target position based data/direction: none encoding: 18 (hex) axis acted on: current axis available on: all axes double buffered: no set_pos_brk sets the current breakpoint mode to positive target position based. in this mode the value loaded into the breakpoint register (set_brk_pnt cmd) will represent the axis position in counts. after the set_pos_brk command is executed, at each servo loop the break point value will be compared against the current axis target position. if the target position has a value equal to or greater than the breakpoint register then all profile and all filter parameters will be loaded in to the active registers. after this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. set_neg_brk set break point mode to negative target position based data/direction: none encoding: 19 (hex) axis acted on: current axis available on: all axes double buffered: no set_neg_brk sets the current breakpoint mode to negative target position based. in this mode the value loaded into the breakpoint register (set_brk_pnt cmd) will represent the axis position in counts after the set_neg_brk command is executed, at each servo loop the break point value will be compared against the current axis target position. if the target position has a value equal to or less than the breakpoint register then all profile and all filter parameters will be loaded into the active registers. after this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. set_actl_pos_brk set break point mode to positive actual position based data/direction: none encoding: 1b (hex) axis acted on: current axis available on: all axes double buffered: no set_actl_pos_brk sets the current breakpoint mode to positive actual position based. in this mode the value loaded into the breakpoint register (set_brk_pnt cmd) will represent the axis position in counts. after the set_actl_pos_brk command is executed, at each servo loop the break point value will be compared against the current axis actual position. if the actual position has a value equal to or greater than the breakpoint register then all profile and all filter parameters will be loaded in to the active registers. after this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set..
50 set_actl_neg_brk set break point mode to negative actual position based data/direction: none encoding: 1c (hex) axis acted on: current axis available on: all axes double buffered: no set_actl_neg_brk sets the current breakpoint mode to negative actual position based. in this mode the value loaded into the breakpoint register (set_brk_pnt cmd) will represent the axis position in counts after the set_actl_neg_brk command is executed, at each servo loop the break point value will be compared against the current axis actual position. if the actual position has a value equal to or less than the breakpoint register then all profile and all filter parameters will be loaded into the active registers. after this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. set_mtn_cmplt_brk set break point mode to motion complete data/direction: none encoding: 35 (hex) axis acted on: current axis available on: all axes double buffered: no set_mtn_cmplt_brk sets the current breakpoint mode to motion complete. in this mode the breakpoint condition is satisfied when the motion complete bit in the axis status word becomes active (axis motion is complete). this breakpoint mode is useful for immediately starting a new profile at the end of the current profile. once the motion complete bit becomes active all double-buffered profile parameters will be loaded in to the active registers. after this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. no 32-bit compare value is required to be loaded when using this breakpoint mode. it is the responsibility of the host to ensure that the motion complete bit is not set when this breakpoint is initiated. set_ext_brk set break point mode to external data/direction: none encoding: 5e (hex) axis acted on: current axis available on: all axes double buffered: no set_ext_brk sets the current breakpoint mode to external. in this mode the breakpoint condition is satisfied when the home signal for the current axis becomes active (goes low). this breakpoint mode is useful for executing a profile change based on some external signal condition. once the home signal becomes active all double-buffered profile parameters will be loaded in to the active registers. after this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. no 32-bit compare value is required to be loaded when using this breakpoint mode. set_brk_off set break point mode off data/direction: none encoding: 6d (hex) axis acted on: current axis available on: all axes double buffered: no set_brk_off sets the breakpoint mode to "off". any breakpoint mode that has been set previously (set_time_brk, set_pos_brk, set_neg_brk, set_actl_pos_brk or set_actl_neg_brk) and is still active (the breakpoint condition has not occurred), is disabled with this command. after this command has been executed no additional breakpoints will occur until a new breakpoint condition is set. set_brk_pnt set break point comparison value data/direction: 2/write encoding: 16 (hex) axis acted on: current axis available on: all axes double buffered: no set_brk_pnt sets the breakpoint comparison value. its contents are interpreted based on the type of breakpoint set; time based (set_time_brk cmd) or position based (set_pos_brk cmd, set_neg_brk cmd, set_pos_actl_brk cmd, and set_neg_actl_brk cmd). when set to time-based the loaded value is compared with the current chip set time at each servo loop, and the value loaded is a 32-bit number with units of servo loops. when set to position-based the loaded value is compared with the current axis target or actual position at each servo loop, and the value loaded is a 32-bit number with units of counts. update immediately update parameters data/direction: none encoding: 1a (hex) axis acted on: current axis available on: all axes double buffered: no update immediately updates all double buffered parameters.
51 multi_update immediately update parameters for multiple axis data/direction: 1/write encoding: 5b (hex) axis acted on: set by data word available on: all axes double buffered: no multi_update immediately updates the profile and filter parameters for 1 or more axis simultaneously. for each updated axis, the axis behaves as if a separate update command had been given for each axis. the associated data word contains a "positive-sense" bit mask for each axis. a one (1) in the axis bit position indicates the axis will be updated. a zero (0) indicates it will not. the following table shows this bit encoding: bit # axis # updated 01 12 2-15 unused, must be set to 0 set_auto_update_on set automatic profile update on data/direction: none encoding: 5c (hex) axis acted on: current available on: all axes double buffered: no set_auto_update_on sets the automatic profile update mechanism on. after this command is sent, a satisfied breakpoint condition will result in all of the double-buffered profile and filter parameters automatically being transferred to the active registers. once set to this mode, the axis will stay in this mode until explicitly commanded out using the set_auto_update_off command. set_auto_update_off set automatic profile update off data/direction: none encoding: 5d (hex) axis acted on: current available on: all axes double buffered: no set_auto_update_off sets the automatic profile update mechanism off. after this command is sent, a satisfied breakpoint condition will not result in the double-buffered profile and filter parameters automatically being transferred to the active registers. once set to this mode, the axis will stay in this mode until explicitly commanded out using the set_auto_update_on command. when in this mode, the only way that profile parameters can be updated is through the update or the multi_update commands. get_brk_pnt get break point comparison value data/direction: 2/read encoding: 57 (hex) axis acted on: current axis available on: all axes double buffered: no get_brk_pnt returns the breakpoint comparison value set using the set_brk_pnt command. the returned value is a 32-bit number with units of either servo loops or counts (depending on the current breakpoint mode). interrupt processing set_intrpt_mask set host interrupt mask data/direction: 1/write encoding: 2f (hex) axis acted on: current axis available on: all axes double buffered: no set_intrpt_mask sets the interrupt mask so that interrupt events can be individually masked off. when a non-masked interrupt occurs in any axis, the interrupt signal to the host is activated (hostintrpt pin on i/o chip). the host can choose to ignore or respond to the interrupt. once an interrupt has been generated, no new interrupts will be generated until a rst_intrpt command is given, after which the interrupt signal to the host will be cleared, and a new interrupt (on any axis) can be generated. the associated data word is encoded as a field of bits, with each bit representing a possible interrupting condition. a 1 value in the mask bit will cause the corresponding event to generate an interrupt, while a 0 will stop the corresponding event from interrupting the host. the bit encoding is as follows: bit # event 0 motion complete 1 position wrap-around 2 update breakpoint reached 3 position capture received 4 motion error 5 positive limit switch 6 negative limit switch 7 command error 8-10 not used, must be set to 0 11 commutation error 12-15 not used, may be set to 0 or 1
52 get_intrpt return status of the interrupting axis data/direction: 1/read encoding: 30 (hex) axis acted on: interrupting axis available on: all axes double buffered: - get_intrpt returns the status of the axis that generated a host interrupt. the current axis number will not be changed after executing this command. see get_status for a definition of the returned status word. if this command is executed when no interrupt condition is present, the status of the current axis will be returned. if this command is executed when no interrupt condition is present, the command will return the status of the current axis (same as get_status command). rst_intrpt reset interrupting condition events data/direction: 1/write encoding: 32 (hex) axis acted on: interrupting axis available on: all axes double buffered: no rst_intrpt resets (clears) the interrupt condition bits for the axis that caused a host interrupt by masking the interrupting axis status word with the specified data word. in addition, the host interrupt signal (hostintrpt pin on i/o chip) is de-activated.the data word is encoded as a field of bits, with each bit representing a possible interrupting condition. for each status word event bit a 1 value in the specified word will cause the status bit to remain unchanged, while a 0 will reset the corresponding event. the bit encoding is as follows: bit # event 0 motion complete 1 position wrap-around 2 breakpoint reached 3 position capture received 4 motion error 5 positive limit switch 6 negative limit switch 7 command error 8-10 not used, may be set to 0 or 1 11 commutation error 12-15 not used, may be set to 0 if this command is executed when no interrupt condition is present, the command will have no effect. get_intrpt_mask get host interrupt mask data/direction: 1/read encoding: 56 (hex) axis acted on: current axis available on: all axes double buffered: no get_intrpt_mask returns the interrupt mask set by the set_intrpt_mask command. the returned value is a bit-encoded mask, described in the set_intrpt_mask command. status/mode clr_status clear all event bit conditions data/direction: none encoding: 33 (hex) axis acted on: current axis available on: all axes double buffered: no clr_status resets (clears) all of the event bit conditions for the axis (bits 0-7 and 11 of the status word). the host interrupt line is not affected by this command. this command is useful for clearing all event bits during initialization, or during on-line usage if the interrupt line and associated commands are not being used. for a detailed description of the status word event bits, see the get_status command. this command does not affect the status of the host interrupt line, only the status event-bits themselves. to reset the host interrupt line, a rst_intrpt command must be sent. rst_status reset specific event bit conditions data/direction: 1/write encoding: 34 (hex) axis acted on: current axis available on: all axes double buffered: no rst_status resets (clears) the condition event bits for the current axis, using a data word mask. the data word is encoded as a field of bits, with each bit representing a possible condition event. for each status word event bit a 1 value in the specified data word will cause the status bit to remain unchanged, while a 0 will reset the corresponding event. the bit encoding is as follows: bit # event 0 motion complete 1 position wrap-around 2 breakpoint reached 3 position capture received 4 motion error 5 positive limit switch 6 negative limit switch 7 command error
53 8-10 not used, may be set to 0 or 1 11 commutation error 12-15 not used, may be set to 0 get_status get axis status word data/direction: 1/read encoding: 31 (hex) axis acted on: current axis available on: all axes double buffered: - get_status returns the status of the current axis.the bit encoding of the returned word is as follows: bit # event 0 motion complete (1 indicates complete) 1 position wrap-around (1 indicates wrap) 2 update breakpoint reached (1 indicates reached) 3 position capture received (1 indicates capture has occurred) 4 motion error (1 indicates motion error) 5 positive limit switch (1 indicates limit switch trip) 6 negative limit switch (1 indicates limit switch trip) 7 command error (1 indicates command error) 8 motor on/off status (1 indicates on) 9 axis on/off status (1 indicates on) 10 in-motion bit (1 indicates axis is in motion) 11 commutation error (1 indicates error) 12,13 current axis # (13 bit = high bit, 12 bit = low bit) 14,15 reserved (may be 0 or 1) bits 0-7 and 11 are set by the chipset, and must be reset by the host (using clr_status, rst_status, or rst_intrpt commands). bits 8, 9, 10, 12, and 13 are continuously maintained by the chipset and are not set or reset by the host. get_mode get axis mode word data/direction: 1/read encoding: 48 (hex) axis acted on: current axis available on: all axes double buffered: - get_mode returns the mode word for the axis.the bit encoding of the returned word is as follows: bit # event 0-6 contains no host-useable information. 7 stop on motion error mode flag. 1 indicates auto stop is on. 8 internal use only. contains no host-useable data 9 contains no host-useable information 10 auto update flag. 1 indicates auto update is disabled. 11,12 trajectory profile mode, encoded as follows: bit 12 bit 11 profile mode 0 0 trapezoidal 0 1 velocity contouring 10s-curve 1 1 electronic gear 13-15 phase # (s-curve profile only). 3-bit word encodes phase #. bit 15 is msb, bit 13 is lsb. encoder set_capt_index set position capture trigger source to the index signal data/direction: none encoding: 64 (hex) axis acted on: current axis available on: all axes double buffered: no set_capt_index sets the high-speed position register trigger source to the index signal. when the index is used as the trigger source, it is gated by the a and b quadrature signals (see theory of operations for details). set_capt_home set position capture trigger source to the home signal data/direction: none encoding: 65 (hex) axis acted on: current axis available on: all axes double buffered: no set_capt_home sets the high-speed position register trigger source to the home signal. get_capt return high speed capture register data/direction: 2/read encoding: 36 (hex) axis acted on: current axis available on: all axes double buffered: - get_capt returns the current value of the high-speed position capture register, as well as resets the capture hardware so that subsequent positions may be captured. the value returned is a 32 bit signed number with units of counts.
54 motor set_output_pwm set motor output mode to pwm data/direction: none encoding: 3c (hex) axis acted on: global (all axes) available on: all axes double buffered: no set_output_pwm sets the motor output mode to pwm. pwm mode outputs the motor output value on 2 output signals (sign and magnitude) for each enabled axis. this command affects the output mode for all axes. set_output_dac16 set motor output mode to 16-bit dac data/direction: none encoding: 3b (hex) axis acted on: global (all axes) available on: all axes double buffered: no set_output_dac16 sets the motor output mode to 16-bit dac. this motor output mode uses a 16-bit data bus, along with various control signals to load a dac value for each enabled axis. this command affects the output mode for all axes. mtr_on enable servo motor output data/direction: none encoding: 43 (hex) axis acted on: current axis available on: all axes double buffered: no mtr_on enables closed loop servo control. when motor output is enabled, motor output values generated by the digital filter are output to the selected output hardware circuitry (pwm, dac12 or dac16). mtr_off disable servo motor output data/direction: none encoding: 42 (hex) axis acted on: current axis available on: all axes double buffered: no mtr_off disables closed loop servo operations. after this command is executed the motor output is taken from the motor command register, set using the set_mtr_cmd command. this register is loaded with a value of 0 at the moment the motor is disabled. this command can be used for emergency shutdowns, for calibrating the motor amplifier, or for running an axis in open loop mode. set_mtr_cmd write direct value to motor output data/direction: 1/write encoding: 62 (hex) axis acted on: current axis available on: all axes double buffered: no set_mtr_cmd loads the motor command register with the specified value. this register replaces the motor command value from the servo filter when the motor is shut off (mtr_off command). the specified motor command is a 16-bit signed number with range -32,767 to +32,767. regardless of the motor output mode (pwm or dac16), a value of -32,767 represents the largest negative direction motor command, a value of 0 represents no motor (0) output command, and a value of 32,767 represents the largest positive motor command. for this command to work properly, the chipset must be in open loop mode (mtr_off cmd or after a motion error with automatic motor stop enabled) get_mtr_cmd read current motor output value data/direction: 1/read encoding: 3a (hex) axis acted on: current axis available on: all axes double buffered: - get_mtr_cmd returns the current motor output command. when the chipset is in closed loop mode this command returns the output of the servo filter. when the chipset is in open loop mode this command returns the contents of the manual output register, set using the set_mtr_cmd command. set_buf_mtr_cmd write double-buffered value to motor output data/direction: 1/write encoding: 77 (hex) axis acted on: current axis available on: 1, 2 double buffered: yes set_buf_mtr_cmd loads the motor command register with the specified value. it is identical to the set_mtr_cmd except that it requires an update command for the written value to take effect. get_output_mode get current motor output mode data/direction: 1/read encoding: 6e (hex) axis acted on: global (all axes) available on: all axes double buffered: - get_output_mode returns the current motor output mode set using the set_output_pwm and set_output_dac16 commands. the
55 returned 16 bit word contains the motor output mode. the encoding is as follows: returned word value output mode 0pwm 1 not used 2dac16 get_buf_mtr_cmd get double-buffered motor output value data/direction: 1/read encoding: 69 (hex) axis acted on: current axis available on: 1, 2 double buffered: - get_buf_mtr_cmd returns the value set using the set_buf_mtr_cmd. the returned value is a 16 bit integer. miscellaneous axis_on enable current axis data/direction: none encoding: 41 (hex) axis acted on: current axis available on: all axes double buffered: no axis_on enables the current axis. axes that are on are serviced normally. axes that are off are not serviced, and will not support any axis features. axes can be enabled or disabled at any time, although care should be taken not to disable an axis such that unsafe motion occurs. axis_off disable current axis data/direction: none encoding: 40 (hex) axis acted on: current axis available on: all axes double buffered: no axis_off disables the current axis. axis that are on are serviced normally. axis that are off are not serviced, and will not support any axis features. axes can be enabled or disabled at any time, although care should be taken not to disable an axis such that unsafe motion occurs. set_actl_pos set actual axis position data/direction: 2/write encoding: 4d (hex) axis acted on: current axis available on: all axes double buffered: no set_actl_pos sets the current actual position to the specified value. in addition, it sets the current target position equal to the specified actual position minus the current actual position error. in this way the current actual position error is maintained, allowing the set_actl_pos command to be used while the axis is moving without causing the servo axis to jump. the desired actual axis position is specified as a signed 32 bit number with an allowed range of - 1,073,741,824 to 1,073,741,823. the loaded position is utilized immediately. no update is required for the command to take effect. get_actl_pos return actual axis position data/direction: 2/read encoding: 37 (hex) axis acted on: current axis available on: all axes double buffered: - get_actl_pos returns the current actual position of the current axis. the value read is up to date to within a servo sample time.the value returned is a 32 bit signed number with units of counts. set_lmt_sense set limit switch bit sense data/direction: 1/write encoding: 66 (hex) axis acted on: global (all axes) available on: all axes double buffered: - set_lmt_sense sets the interpretation of the limit switch input bits. this command provides added flexibility in interfacing to various switch/sensor components. the signal level interpretation for the positive and negative switch inputs are bit-programmable. a 0 in the corresponding bit of the sense word indicates that the input will be active high. a 1 in the sense word indicates that the input will be active low. the sense word is encoded as follows: bit # description 0 axis 1 positive limit switch (0 = active high) 1 axis 1 negative limit switch (0 = active high) 2 axis 2 positive limit switch (0 = active high) 3 axis 2 negative limit switch (0 = active high) 4-15 not used (must set to 0) the above bits are encoded as shown for the mc1231a. for the mc1131a axis 2 is not used.
56 get_lmt_swtch get state of over-travel limit switches data/direction: 1/read encoding: 67 (hex) axis acted on: global (all axes) available on: all axes double buffered: - get_lmt_swtch returns the value of the limit switch input signals for all valid axis. the returned word is encoded as follows: bit # description 0 axis 1 positive limit switch (1 = high) 1 axis 1 negative limit switch (1 = high) 2 axis 2 positive limit switch (1 = high) 3 axis 2 negative limit switch (1 = high) 4-15 not used (set to 0) the above bits are encoded as shown for the mc1231a. for the mc1131a axis 2 will always be set to 0. the values returned by this command are not affected by the set_lmt_sense command. lmts_on set limit switch sensing on data/direction: none encoding: 70 (hex) axis acted on: global (all axes) available on: all axes double buffered: - lmts_on turns the limit switch sensing mechanism on. this command is primarily intended for compatibility with the mc1400 chipset, although it can also be used to re-enable limit switch sensing whenever it has been disabled using the lmts_off command. lmts_off set limit switch sensing off data/direction: none encoding: 71 (hex) axis acted on: global (all axes) available on: all axes double buffered: - lmts_off turns the limit switch sensing mechanism off. this command is primarily intended for compatibility with the mc1400 chipset, although it can also be used whenever it is desired that limit switch sensing not be active. this command only disables the automatic setting of the negative and positive limit switch bits in the status word. it does not affect the status of these bits if they have already been set, nor does it affect the get_lmt_swtch command. get_home get state of home signal inputs data/direction: 1/read encoding: 05 (hex) axis acted on: global (all axes) available on: all axes double buffered: - get_home returns the value of the home signal inputs for all valid axes. the returned word is encoded as follows: bit # description axis 1 home signal (1 = high) 1 axis 2 home signal (1 = high) 2-15 not used (set to 0) the above bits are encoded as shown for the mc1231a. for the mc1131a axis 2 will always be set to 0. set_smpl_time set servo loop sample time data/direction: 1/write encoding: 38 (hex) axis acted on: global (all axes) available on: all axes double buffered: no set_smpl_time sets the servo sampling time which is the amount of time between servo updates. all axes operate at the same sample rate, and therefore are all affected by this command. the written value consists of the sample time expressed in units of 135 micro-seconds. for example a written value of 4 sets the loop time to 540 usec. the allowed range is 1 to 32,767, however see theory of operations section for guidelines on the minimum values that can be used. get_smpl_time get servo loop sample time data/direction: 1/read encoding: 61 (hex) axis acted on: global (all axes) available on: all axes double buffered: no get_smpl_time returns the sample time set using the command set_smpl_time. the returned value is a 16 bit unsigned number with units of 135 usecs.
57 reset reset chip set data/direction: none encoding: 39 (hex) axis acted on: global (all axes) available on: all axes double buffered: no reset resets the entire chip set. this command performs the same sequence as a hardware reset. at the end of this operation the chip set will be in the default or powerup condition, defined as follows: condition initial value all actual axis positions 0 all capture registers 0 all event conditions cleared host interrupt (hostintrpt) signal not active all interrupt masks 0 all profile modes trapezoidal all filter modes pid all profile parameter values 0 all filter gains 0 all integration limits 32767 all max. position error values 32767 all brkpnt comparison values 0 auto update enabled (on) all axes status' enabled (on) all motor status' enabled (on) all auto stop modes enabled (on) limit switch sensing enabled (on) limit switch sense register 0 (all active high) output mode pwm all motor output values 0 current axis number 1 sample time 4 - mc1231a 2 - mc1131a all waveforms 3-phase all initial phase offsets ffff (hex) all # counts per comm. cycle 0 all phase init methods algorithmic all commutation modes encoder-based all prescalars disabled all phase advance gains 0 hall sense register 0 (all active high) all phase init durations 0 after a reset (software or hardware) the chipset requires at least 2 milliseconds before it can accept another host i/o command get_vrsn return chipset software information data/direction: 1read encoding: 6c (hex) axis acted on: global (all axes) available on: all axes double buffered: - get_vrsn returns various information on the chipset part number and software version. the encoding is as follows: bit # interpretation 0-2 minor software version 3-4 major software version. major software versions 2 and above indicate 'a' versions parts 5-7 "dash" version # (no dash = 0, -p = 1 8-10 part number code 0 = 00 (mc1400-series), 1 = 01 (mc1401-series), 2 = 31 (mc1231-series) , 3 = 41 (mc1241-series), 4 = 51 (mc1451-series) 11-13 # axes supported (0 = 1) 14-15 generation # (1) for example, the returned version code for the mc1401 (version 1.0 software) is 5908 (hex), the returned version code for the mc1201-p (version 1.0 software) is 4928, and the returned version code for the mc1231 (version 1.3 software) is 4a0b get_time return current chip set time. data/direction: 2/read encoding: 3e (hex) axis acted on: global (all axes) available on: all axes double buffered: - get_time returns the current system time, expressed as the number of servo loops since chip set power on.the chip set clock starts at 0 after a power on or reset and will count indefinitely, wrapping from a value of 4,294,967,295 to 0. the returned value is a 32 bit number with units of sample times. commutation set_phase_3 set waveform to 3-phase data/direction: none encoding: 73 (hex) axis acted on: global available on: all double buffered: no set_phase_3 sets the current commutation waveform to 3-phase brushless. in this scheme the commutated output signals have a phase separation of 120 degrees.
58 set_phase_2 set waveform mode to 2-phase data/direction: none encoding: 74 (hex) axis acted on: global available on: all double buffered: no set_phase_2 sets the current commutation waveform to 2-phase. in this scheme the commutated output signals have a phase separation of 90 degrees. set_phase_hall set phase initialization to hall-based data/direction: none encoding: 78 (hex) axis acted on: current axis available on: all double buffered: no set_phase_hall sets the phase initialization mode to hall-based. in this mode the phasing of the motor is initialized immediately after the host sends an init_phase command by reading the state of the three hall-sensors. phasing is completed automatically after the motor has moved through one full rotation. set_phase_algor set phase initialization to algorithmic data/direction: none encoding: 79 (hex) axis acted on: current axis available on: all double buffered: no set_phase_algor sets the phase initialization mode to algorithmic. in this mode the phasing of the motor is initialized by applying energy to the windings and observing the resultant motor motion. before the phase initialization routine can be performed the motor must be in open loop mode (mtr_off command). the amount of time that the chipset waits to initialize the phase after applying energy is set using the command set_phase_time. before phase initialization occurs the amount of energy to apply to the motor is set using the command set_buf_mtr_cmd. to actually begin the algorithmic initialization procedure the command init_phase is used. set_phase_enc set commutation mode to encoder- based data/direction: none encoding: 5f (hex) axis acted on: current axis available on: all double buffered: no set_phase_enc sets the commutation mode to encoder-based. this is the normal operating mode of the mc1231a chipset. in this mode the commutation angle is determined by the encoder location (maintained continuously by chipset) , the initial phase offset value (determined during phase initialization sequence) , and the # of encoder counts per electrical cycle (provided by host). set_phase_micro set commutation mode to microstepping data/direction: none encoding: 63 (hex) axis acted on: current axis available on: all double buffered: no set_phase_micro sets the commutation mode to microstepping. this is not the normal operating mode of the mc1231a chipset and should only be used during phase initialization if the algorithmic or hall- based methods can not be used. prescale_on set encoder prescalar on data/direction: none encoding: 0d (hex) axis acted on: current axis available on: all double buffered: no prescale_on enables the encoder prescalar function which reduces the rate of encoder counts used for commutation by a factor of 64. this command does not affect the actual axis position, the servo filter output, or any other encoder-related functions other than those used directly for commutation. this command should only be used when the commutation mode is encoder-based, and when the motor is not in motion. prescale_off set encoder prescalar off data/direction: none encoding: 0e (hex) axis acted on: current axis available on: all double buffered: no prescale_off disables the encoder prescalar function which reduces the rate of encoder counts used for commutation by a factor of 64. set_phase_cnts set number of encoder counts per commutation cycle data/direction: 1/write encoding: 75 (hex) axis acted on: current axis available on: all double buffered: no set_phase_cnts sets the number of encoder counts per commutation electrical cycle. the associated data word is an unsigned 16 bit number, with an allowed range of 129 to 32,767.
59 the minimum allowed value for this parameter is 129 (decimal). set_phase_time set amount of time to wait after phase initialization data/direction: 1/write encoding: 72 (hex) axis acted on: current axis available on: all double buffered: no set_phase_time sets the amount of time to wait after the init_phase command has been given. this command is not used if the initialization method is hall-based. the value specified is in units of sample times. the associated data word is an unsigned 16 bit number, with an allowed range of 1 to 32,767. set_phase_offset set phase offset value data/direction: 1/write encoding: 76 (hex) axis acted on: current axis available on: all double buffered: no set_phase_offset sets the phase offset angle used to maintain proper motor commutation. the value specified is in units of encoder counts, and represents the offset from the index mark (in encoder counts) to the phase a maximum output value (cosine of angle 0). the associated data word is an unsigned 16 bit number, with an allowed range of 1 to 32,767. this parameter can be changed on the fly if desired. this command will not function if index pulses are not used. in addition this command will not take affect until an index pulse is received from the motor. set_kphase set velocity phase advance gain data/direction: 1/write encoding: 1f (hex) axis acted on: current axis available on: all double buffered: no set_kphase sets velocity phase advance gain. the value specified has an allowed range of 0 to 32,767. this parameter can be changed on the fly if desired. set_hall_sense set hall-sensor logic level interpretation data/direction: 1/write encoding: 23 (hex) axis acted on: current axis available on: all double buffered: no set_hall_sense sets the interpretation of the hall-sensor input bits. this command provides added flexibility in interfacing to various hall- sensor components. the signal level interpretation is bit-programmable. a 0 in the corresponding bit of the sense word indicates that the input will be active high. a 1 in the sense word indicates that the input will be active low. the sense word is encoded as follows: bit # description 0 hall sensor 1a (0 = active high) 1 hall sensor 1b (0 = active high) 2 hall sensor 1c (0 = active high) 3 hall sensor 2a (0 = active high) 4 hall sensor 2b (0 = active high) 5 hall sensor 2c (0 = active high) 6-15 not used (must set to 0) the above bits are encoded as shown for the mc1231a. for the mc1131a axis 2 inputs are not used. set_phase set current commutation phase angle data/direction: 1/write encoding: 84 (hex) axis acted on: current axis available on: all double buffered: - set_phase sets the current instantaneous commutation angle. it should generally only be used when the motor is stationary. the value specified has an allowed range of 0 to the # of encoder counts per electrical cycle (set using set_phase_cnts command). the set_phase command causes the 'phasing not initialized' flag in the phase info word (get_phase_info command) to be set false (0), indicating phasing has been initialized. init_phase perform phase initialization procedure. data/direction: 0 encoding: 7a (hex) axis acted on: current axis available on: all double buffered: no init_phase performs the phase initialization procedure. this command is used with both initialization methods; hall-based (set_phase_hall command), and algorithmic (set_phase_algor command). when used with the hall-based method this command will not result in any motor motion. when used with the algorithmic method this command will result in the motor
60 rapidly moving a short distance, with the final location being stored after a delay time set using the set_phase_time command. when used in the algorithmic initialization mode before this command is given a double-buffered motor command value must be specified (set_buf_mtr_cmd command), an initialization duration must be specified (set_phase_time command), and the motor must be turned off (mtr_off command). after executing this command the motor may jump suddenly. precautions should be taken to avoid damage. get_phase_info get commutation flags set by host. data/direction: 1/read encoding: 7f (hex) axis acted on: current axis available on: all double buffered: - get_phase_info returns the state of various commutation-related flags maintained by the chipset. the returned word is a 16-bit word encoded as follows: bit # interpretation 0 phase initialization mode (0 = algorithmic, 1 = hall-based) 1 used internally by chipset 2 commutation mode. (1 = microstepping, 0 = encoder-based) 3 waveform (0 = 3-phase, 1 = 2-phase) 4-6 used internally by chipset 7 prescalar status (0 = off, 1 = on) 8 phasing not initialized flag. (1 = not initialized, 0 = initialized) 9 used internally by chipset 10-15 unused get_phase_cnts get number of encoder counts per commutation cycle data/direction: 1/read encoding: 7d (hex) axis acted on: current axis available on: all double buffered: - get_phase_cnts returns the number of encoder counts per commutation electrical cycle set using the set_phase_cnts command. the returned value is in units of encoder counts, and is an unsigned 16 bit number. get_phase_time get amount of time to wait after phase init data/direction: 1/read encoding: 7c (hex) axis acted on: current axis available on: all double buffered: - get_phase_time returns the amount of time that the chipset will wait during phase initialization set using the set_phase_time command. the returned word has units of sample times and is an unsigned 16 bit number. get_phase_offset get phase offset value data/direction: 1/read encoding: 7b (hex) axis acted on: current axis available on: all double buffered: - get_phase_offset returns the phase offset value determined using the init_phase command, or set explicitly using the set_phase_offset command. a value of ffff (hex) in this register indicates that phase initialization has not been completed, or that the first index pulse has not yet been received. the returned value is a 16 bit integer with a range of 0 to 32,767. get_kphase get velocity phase advance gain data/direction: 1/read encoding: 20 (hex) axis acted on: current axis available on: all double buffered: - get_kphase returns the velocity phase advance gain set using the set_kphase command. the returned value is a 16-bit integer with a range of 0 to 32,767. get_hall_sense get the hall-sensor logic level interpretation data/direction: 1/read encoding: 24 (hex) axis acted on: current axis available on: all double buffered: - get_hall_sense returns the hall-sensor logic level interpretation value. the returned value is a 16-bit integer encoded as described in the set_hall_sense command.
61 get_halls get state of hall sensors data/direction: 1/read encoding: 7e (hex) axis acted on: global available on: all double buffered: - get_halls returns the state of the hall sensors input into the chipset. the returned word is encoded as follows: bit # interpretation 0 hall sensor 1a (0 = low) 1 hall sensor 1b (0 = low) 2 hall sensor 1c (0 = low) 3 hall sensor 2a (0 = low) 4 hall sensor 2b (0 = low) 5 hall sensor 2c (0 = low) get_phase get current commutation phase angle data/direction: 1/read encoding: 2c (hex) axis acted on: current axis available on: all double buffered: - get_phase returns the current commutation phase angle, expressed as the # of encoder counts past the max. value of phase a (cosine of angle 0). the returned value is a 16-bit integer with a range of 0 to 32,767. this command can be useful for diagnostic purposes, as well as for amplifier calibration.
62 application notes interfacing mc1231a to isa bus. a complete, ready-to-use isa (pc/at) bus interface circuit has been provided to illustrate mc1231a host interfacing, as well as to make it easier for the customer to build an mc1231a-based system. the interface between the pmd mc1231a chip set and the isa (pc- at) bus is shown on the following page. comments on schematic this interface uses a 22v10 pal and a 74ls245 to buffer the data lines.this interface assumes a base address is assigned in the address space of a9-a0. 300-400 hex these addresses are generally available for prototyping and other system-specific uses without interfering with system assignments. this interface occupies 16 addresses from xx0 to xxf hex though it does not use all the addresses. two select lines are provided allowing the base address to be set to 340,350,370 and 390 hex for the select lines s1,s0 equal to 0,1,2,and 3 respectively.the address assignments used are as follows, where badr is the base address, 340 hex for example: address use 340h read-write data 342h write command 344h read status (hostrdy) [d7 only] 348h write reset [data= don't care] the base address (badr) is decoded in adrdec. it is nanded with sa2:sa3, badr+0, (b+0) to form -hsel to select the i/o chip. b+0 nanded with ior* forms -hrd, host read, directly. the 22v10 tail-bites the write pulse since the setup time is greater than necessary on the bus some of the bus duration is used to generate data hold time at the i/o chip. -hwr, host write is set the first clock after b+0 and iow* is recognized. the next clock sets tog and clears -hwr. tog remains set holding -hwr clear until iow* is unasserted on the bus indicating the end of the bus cycle. b+4 and ior* out enables hrdy to sd7 so the status of hrdy may be tested. sd7 is used since the sign bit of a byte may be easily tested. the rest of the data bits are left floating and should be ignored. b+8 and iow* generate a reset pulse which will init the interface by clearing the two write registers and outputs a reset pulse, -rs, for the cp chip. the reset instruction is or'd with reset on the bus to initialize the pmd chip set when the pc is reset.
63
64 pwm motor interface the following schematic shows a typical interface circuit between the mc1231a and an amplifier used in pwm output mode. the sgsl6234 from sgs-thompson is an integrated package which provides 3 half-bridge amplifiers on a single chip. it can drive up to 2 amps continuous at 52 volts. other integrated 3-phase drivers that are compatible with the pmd chipset's sinusoidal output are available from other vendors. call pmd for details.
65
66 16-bit parallel dac interface the interface between the mc1231a chip set and one or more 16 bit dacs is shown in the following figure. comments on schematic the 16 data bits and 2 address bits from the cp chip are latched in the two 74fct841 latches when the cp writes to address f hex, in the address bits a0:a3. three 74c373 latches could also be used. if this is a write to the dac, dacslct will be asserted during this cp bus cycle. the assertion of dacslct will be latched by the fed-back and-or gate and the next clock will set the dacwr flop. the second clock will set the second shift flop which will clear the dacl latch. since this latch has been cleared the third clock will clear dacwr providing a two clock dacwr level. the fourth clock will clear the second shift flop returning the system to its original state waiting for the next dacslct. the dacwr assertion will enable the decoder causing the dac selected by the address bits stored in the transparent latch. the timing described will produce a two clock write pulse to the dacs. this will be about 320 nsec using i/oclk.
67
68 notes
69 notes
incremental encoder trajectory profile generator digital servo filtering (2) host i/o controller index b a internal block diagram host interrupt data control pwm sign dac address motor output system registers (2) 16 1/a 1/a 1/a 1/phase 2 1 8 5 quadrature decoder counter (2) index capture register (2) position register (2) host command dac, pwm signal generator (6 home 1/a poslimit 1/a neglimit 1/a available configurations: operating modes: position range: velocity range: acceleration range: jerk range: trajectory profile generator modes: electronic gear ratio range: digital filter modes: motor output formats: commutation waveform: # of output phases per axis: commutation rate: max. encoder rate: servo loop rate range: max. servo loop rate: # of limit switches per axis: hardware position capture latency: hardware position capture triggers: # of host commands: 2 axes with internal sinusoidal commutation (mc1231a) 1 axis with internal sinusoidal commutation (mc1131a) closed loop (uses trajectory generator, servo loop, and commutation) open loop (uses commutation only) -1,073,741,824 to 1,073,741,823 counts -16,384 to 16,383 counts/sample with a resolution of 1/65,536 counts/sample s-curve profile: -1/2 to 1/2 counts/sample^2 with a resolution of 1/65,536 counts/sample^2 all other profiles: -16,384 to 16,383 counts/sample^2 with a resolution of 1/65,536 counts/sample^2 -1/2 to 1/2 counts/sample^3, with a resolution of 1/4,294,967,296 counts/sample^3 s-curve (host commands final position, maximum velocity, maximum acceleration, and jerk) trapezoidal (host commands final position, maximum velocity, and acceleration) velocity contouring (host commands maximum velocity, acceleration) electronic gear (encoder position of one axis is used as position command for another axis). 32768:1 to 1:32768 (negative and positive direction) pid+vff (proportional, integral, derivative + velocity feedforward and dc offset) pwm (10 bits resolution @ 24.5 khz) dac (16 bits) sinusoidal pwm : 2 for 2-phase motors, 3 for 3-phase motors dac16: 2 for both 2-phase and 3-phase motors 15 khz 1.75 megacounts/sec. 270 usec minimum, 4,423 msec maximum 270 usec per enabled axis 2 (one for each direction of travel) 160 nsec index signal (quadrature a and b must be low) home signal 116 technical specifications ordering information p/n: mc1 31a 2 - 2 axis 1 - 1 axis custom chipset versions also available. call pmd commutation generator (2) p/n: dk1231a* *(supports mc1231a and mc1131a) chipset chipset developer's kit i/o chip cp chip performance motion devices, inc. 12 waltham st. lexington, ma 02421 tel: 781.674.9860 fax: 781.674.9861 www.pmdcorp.com


▲Up To Search▲   

 
Price & Availability of MC1101A-P

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X